(client) fix:修复匿名定义中的图片无法加载的问题

This commit is contained in:
m0_75251201
2025-07-19 13:33:49 +08:00
parent 526e8850e4
commit 0c8eebdd4b
31 changed files with 2684 additions and 568 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: abc9d6807f0a8214db6e839a5c956e8d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,259 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &190104900697248908
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1690722858018107951}
- component: {fileID: 6659858081700418582}
- component: {fileID: 7794534526379226234}
- component: {fileID: 8827200521422920569}
m_Layer: 5
m_Name: ButtonTemplate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1690722858018107951
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190104900697248908}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5927793165581159640}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -160.92151, y: -93.26492}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6659858081700418582
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190104900697248908}
m_CullTransparentMesh: 1
--- !u!114 &7794534526379226234
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190104900697248908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.4339623, g: 0.4339623, b: 0.4339623, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8827200521422920569
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190104900697248908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 7794534526379226234}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2444016289016785342
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5927793165581159640}
- component: {fileID: 5077515012459947177}
- component: {fileID: 5723833987058492246}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5927793165581159640
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2444016289016785342}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1690722858018107951}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5077515012459947177
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2444016289016785342}
m_CullTransparentMesh: 1
--- !u!114 &5723833987058492246
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2444016289016785342}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Button
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 317edb274e9c5144a9916937bdbf7716, type: 2}
m_sharedMaterial: {fileID: -1361428157011412921, guid: 317edb274e9c5144a9916937bdbf7716, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f0afd08be12de0d43af753af4f618da4
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,138 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &27210933623785530
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 632585612639644796}
- component: {fileID: 6803973761688315705}
- component: {fileID: 7303780691383776844}
m_Layer: 5
m_Name: TextTemplate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &632585612639644796
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 27210933623785530}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.0921326, y: -79.25658}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6803973761688315705
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 27210933623785530}
m_CullTransparentMesh: 1
--- !u!114 &7303780691383776844
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 27210933623785530}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: New Text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 317edb274e9c5144a9916937bdbf7716, type: 2}
m_sharedMaterial: {fileID: -1361428157011412921, guid: 317edb274e9c5144a9916937bdbf7716, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4572fd0db4eb91d4588451064f59c91b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -119,362 +119,7 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &330585543
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 330585546}
- component: {fileID: 330585545}
- component: {fileID: 330585544}
- component: {fileID: 330585547}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &330585544
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
--- !u!20 &330585545
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &330585546
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &330585547
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 330585543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 1
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
--- !u!1 &410087039
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 410087041}
- component: {fileID: 410087040}
- component: {fileID: 410087042}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &410087040
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
m_Enabled: 1
serializedVersion: 11
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 2
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 5000
m_UseColorTemperature: 1
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ForceVisible: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
m_LightUnit: 1
m_LuxAtDistance: 1
m_EnableSpotReflector: 1
--- !u!4 &410087041
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
serializedVersion: 2
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &410087042
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 410087039}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 1
--- !u!1 &436334521
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 436334523}
- component: {fileID: 436334522}
m_Layer: 0
m_Name: EntryPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &436334522
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436334521}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b87e0a61112e899429b941b1dcb30018, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &436334523
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 436334521}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &832575517
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 832575519}
- component: {fileID: 832575518}
m_Layer: 0
m_Name: Global Volume
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &832575518
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IsGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
--- !u!4 &832575519
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 832575517}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 436334523}
- {fileID: 330585546}
- {fileID: 410087041}
- {fileID: 832575519}
m_Roots: []

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5995047d2fd0f65408e4a7910dca711a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,32 +2,10 @@
namespace Data
{
public class CharacterAttributesDef : Define
public class AttributesDef : Define
{
public int health = 10;
public int moveSpeed = 1;
}
public class WeaponAttributesDef : Define
{
public int attack = 1;
public int defense = 0;
public int attackSpeed = 2;
public int attackRange = 3;
public int attackTargetCount = 1;
}
public class MonsterAttributesDef : Define
{
public int health = 10;
public int moveSpeed = 1;
public int attack = 1;
public int defense = 0;
public int attackSpeed = 2;
public int attackRange = 3;
public int attackTargetCount = 1;
}
public class BuildingAttributesDef : Define
{
public int health = 10;
public int attack = 1;
public int defense = 0;
public int attackSpeed = 2;

View File

@ -22,54 +22,13 @@ namespace Data
Animation
}
public class CharacterDef : Define
public class CharacterDef : PawnDef
{
public CharacterAttributesDef attributes;
public string texturePath = null;
public DrawingOrderDef
drawingOrder_down,
drawingOrder_up,
drawingOrder_left,
drawingOrder_right;
public DrawingOrderDef GetDrawingOrder(Orientation orientation)
{
// 定义一个临时变量用于存储结果
DrawingOrderDef result = null;
// 根据传入的 Orientation 获取对应的 DrawingOrderDef
switch (orientation)
{
case Orientation.Down:
result = drawingOrder_down;
break;
case Orientation.Up:
result = drawingOrder_up;
break;
case Orientation.Left:
result = drawingOrder_left;
break;
case Orientation.Right:
result = drawingOrder_right;
break;
default:
throw new ArgumentException("Invalid orientation value.");
}
// 如果当前方向的结果为空,则尝试用 drawingOrder_down 填充
if (result == null) result = drawingOrder_down;
// 如果 drawingOrder_down 仍然为空,则尝试用其他非空方向填充
if (result == null) result = drawingOrder_up ?? drawingOrder_left ?? drawingOrder_right;
return result;
}
}
public class DrawingOrderDef : Define
{
public List<DrawNodeDef> drawNodes = new();
public override bool Init(XElement xmlDef)
{
base.Init(xmlDef);

View File

@ -0,0 +1,8 @@
namespace Data
{
public class ItemDefine:Define
{
public ImageDef texture;
public AttributesDef attributes;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c4d338c5c7b24cd5a496acb98ebf5e3c
timeCreated: 1752760211

View File

@ -0,0 +1,51 @@
using System;
namespace Data
{
public class PawnDef : Define
{
public string aiController;
public string texturePath = null;
public DrawingOrderDef
drawingOrder_down,
drawingOrder_up,
drawingOrder_left,
drawingOrder_right;
public DrawingOrderDef GetDrawingOrder(Orientation orientation)
{
// 定义一个临时变量用于存储结果
DrawingOrderDef result = null;
// 根据传入的 Orientation 获取对应的 DrawingOrderDef
switch (orientation)
{
case Orientation.Down:
result = drawingOrder_down;
break;
case Orientation.Up:
result = drawingOrder_up;
break;
case Orientation.Left:
result = drawingOrder_left;
break;
case Orientation.Right:
result = drawingOrder_right;
break;
default:
throw new ArgumentException("Invalid orientation value.");
}
// 如果当前方向的结果为空,则尝试用 drawingOrder_down 填充
if (result == null) result = drawingOrder_down;
// 如果 drawingOrder_down 仍然为空,则尝试用其他非空方向填充
if (result == null) result = drawingOrder_up ?? drawingOrder_left ?? drawingOrder_right;
return result;
}
}
public class MonsterDef:PawnDef
{
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0a89bc126c0a466799f6ccb963267419
timeCreated: 1752751832

View File

@ -11,10 +11,11 @@ namespace Managers
{
public class DefineManager : Singleton<DefineManager>
{
private static readonly string[] dataSetFilePath = { "Data", "Mod" };
private static readonly string[] dataSetFilePath = { "Data", "Mods" };
public Dictionary<string, Dictionary<string, Define>> defines = new();
public Dictionary<string, DefinePack> packs = new();
public Dictionary<string, List<Define>> anonymousDefines = new();
/// <summary>
/// 初始化定义管理器,加载所有定义包并构建定义字典。
/// </summary>
@ -32,11 +33,52 @@ namespace Managers
var pack = new DefinePack();
if (pack.LoadPack(folder)) packs.Add(pack.packID, pack);
}
Dictionary<Type, FieldInfo[]> fieldCache = new();
//不优化到循环里面是因为要先建立索引再链接
List<Tuple<Define, FieldInfo, Define>> defineCache = new();
HashSet<Define> processedDefines = new(); // 用于跟踪已处理的 Define 对象
void ProcessDefine(Define def, Define parentDef, FieldInfo parentField)
{
if (def == null || def.isReferene || processedDefines.Contains(def))
return;
processedDefines.Add(def);
// 如果字段信息已经缓存,则直接使用缓存
if (!fieldCache.TryGetValue(def.GetType(), out var defineFields))
{
// 获取所有字段类型为 Define 或其派生类型的字段
defineFields = def.GetType()
.GetFields(BindingFlags.Public | BindingFlags.Instance)
.Where(field => typeof(Define).IsAssignableFrom(field.FieldType))
.ToArray();
// 缓存字段信息
fieldCache[def.GetType()] = defineFields;
}
foreach (var defineField in defineFields)
{
var defRef = (Define)defineField.GetValue(def);
if (defRef == null)
continue;
if (defRef.isReferene)
{
defineCache.Add(new Tuple<Define, FieldInfo, Define>(parentDef, parentField, defRef));
}
else
{
if (string.IsNullOrEmpty(defRef.defName))
{
var typeName = defRef.GetType().Name;
if (!anonymousDefines.ContainsKey(typeName))
anonymousDefines.Add(typeName, new List<Define>());
anonymousDefines[typeName].Add(defRef);
}
ProcessDefine(defRef, def, defineField);
}
}
}
foreach (var pack in packs)
{
foreach (var define in pack.Value.defines)
@ -51,34 +93,16 @@ namespace Managers
{
defines[typeName][def.defName] = def;
// 如果字段信息已经缓存,则直接使用缓存
if (!fieldCache.TryGetValue(def.GetType(), out var defineFields))
{
// 获取所有字段类型为 Define 或其派生类型的字段
defineFields = def.GetType()
.GetFields(BindingFlags.Public | BindingFlags.Instance)
.Where(field => typeof(Define).IsAssignableFrom(field.FieldType))
.ToArray();
// 缓存字段信息
fieldCache[def.GetType()] = defineFields;
}
foreach (var defineField in defineFields)
{
var defRef=(Define)defineField.GetValue(def);
if (defRef==null || !defRef.isReferene)
continue;
defineCache.Add(new(def, defineField, defRef));
}
// 处理顶层 Define
ProcessDefine(def, null, null);
}
}
}
foreach (var defRef in defineCache)
{
defRef.Item2.SetValue(defRef.Item1, FindDefine(defRef.Item3.description, defRef.Item3.defName));
}
Debug.Log(anonymousDefines.Count);
}
/// <summary>
/// 查找指定定义类型的定义名对应的 Define 对象。
@ -126,6 +150,11 @@ namespace Managers
{
defineList.AddRange(define.Values);
}
foreach (var anonymousDefine in anonymousDefines)
{
defineList.AddRange(anonymousDefine.Value);
}
return defineList.ToArray();
}
@ -160,7 +189,7 @@ namespace Managers
return targetDefine;
}
/// <summary>
/// 查询指定类型下的所有 Define 对象。
/// 查询指定类型下的所有 Define 对象。(包括匿名定义)
/// </summary>
/// <param name="defineType">定义类型(外层字典的键)。</param>
/// <returns>该类型下的 Define 数组,如果未找到则返回 null。</returns>
@ -172,39 +201,49 @@ namespace Managers
return null;
}
if (!defines.TryGetValue(defineType, out var typeDefinitions))
List<Define> result = new List<Define>();
// 从命名定义中查询
if (defines.TryGetValue(defineType, out var namedDefinitions))
{
result.AddRange(namedDefinitions.Values);
}
// 从匿名定义中查询
if (anonymousDefines.TryGetValue(defineType, out var anonymousDefinitionList))
{
result.AddRange(anonymousDefinitionList);
}
// 如果结果为空,则返回 null
if (result.Count == 0)
{
Debug.LogWarning($"查询失败:未找到定义类型 '{defineType}'");
return null;
}
return typeDefinitions.Values.ToArray();
return result.ToArray();
}
/// <summary>
/// 查询指定类型下的所有 Define 对象,并尝试转换为目标类型。
/// 查询指定类型下的所有 Define 对象,并尝试转换为目标类型。(包括匿名定义)
/// </summary>
/// <typeparam name="T">目标类型。</typeparam>
/// <returns>转换后的目标类型数组,如果未找到或转换失败则返回 null。</returns>
public T[] QueryDefinesByType<T>()
{
var defineType = typeof(T).Name;
if (string.IsNullOrEmpty(defineType))
{
Debug.LogError("查询失败:定义类型参数不能为空!");
return null;
}
if (!defines.TryGetValue(defineType, out var typeDefinitions))
List<Define> allDefines = QueryDefinesByType(defineType)?.ToList();
if (allDefines == null || allDefines.Count == 0)
{
Debug.LogWarning($"查询失败:未找到定义类型 '{defineType}'");
return null;
}
try
{
// 获取所有值并尝试转换为目标类型
// 尝试将所有 Define 对象转换为目标类型 T
var result = new List<T>();
foreach (var item in typeDefinitions.Values)
foreach (var item in allDefines)
{
if (item is T converted)
{
@ -216,6 +255,7 @@ namespace Managers
return null;
}
}
return result.ToArray();
}
catch (Exception ex)

View File

@ -16,7 +16,7 @@ namespace Map
void Start()
{
TileManager.Instance.Init();
var mapSize = 100;
var mapSize = 10;
float noiseScale = 0.1f;
for (int x = 0; x < mapSize; x++)
@ -39,11 +39,6 @@ namespace Map
mapData.Add(col);
UpdateTexture();
}
for (int x = 0; x < 16; x++)
{
textureLevel.SetTile(new(x,-1),TileManager.Instance.tileBaseMapping.GetValueOrDefault($"GrassDirt_{x}"));
}
}
public void UpdateTexture()

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6303ff87d5e946649be1abf4e7feb895
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,26 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
namespace UI
{
public class DevMenuUI : MonoBehaviour
{
public GameObject menuContent;
public GameObject textTemplate;
public GameObject buttonTemplate;
void Start()
{
Init();
}
void Init()
{
}
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c83e72721411938449d92dd48c76480d

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 317edb274e9c5144a9916937bdbf7716
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 8667f92a630aebc4a8efde4f907e7caf
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- SimHei
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
@ -67,6 +71,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
@ -107,9 +112,9 @@ Material:
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
- _ScaleRatioA: 0.90909094
- _ScaleRatioA: 0.9
- _ScaleRatioB: 0.73125
- _ScaleRatioC: 0.7386364
- _ScaleRatioC: 0.73125
- _ScaleX: 1
- _ScaleY: 1
- _ShaderFlags: 0
@ -148,6 +153,8 @@ Material:
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
@ -161,11 +168,6 @@ MonoBehaviour:
m_Name: LiberationSans SDF - Fallback
m_EditorClassIdentifier:
m_Version: 1.1.0
m_Material: {fileID: 2180264}
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
@ -188,57 +190,8 @@ MonoBehaviour:
m_StrikethroughOffset: 18
m_StrikethroughThickness: 6.298828
m_TabWidth: 24
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 1
m_ClearDynamicDataOnBuild: 1
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 511
m_Height: 511
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
atlas: {fileID: 0}
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
m_FontFeatureTable:
m_MultipleSubstitutionRecords: []
m_LigatureSubstitutionRecords: []
m_GlyphPairAdjustmentRecords: []
m_MarkToBaseAdjustmentRecords: []
m_MarkToMarkAdjustmentRecords: []
fallbackFontAssets: []
m_FallbackFontAssetTable: []
m_Material: {fileID: 2180264}
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
@ -258,6 +211,36 @@ MonoBehaviour:
fontStyleModifier: 0
renderMode: 4169
includeFontFeatures: 1
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFilePath:
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 1
m_GetFontFeatures: 1
m_ClearDynamicDataOnBuild: 1
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 511
m_Height: 511
m_FontFeatureTable:
m_MultipleSubstitutionRecords: []
m_LigatureSubstitutionRecords: []
m_GlyphPairAdjustmentRecords: []
m_MarkToBaseAdjustmentRecords: []
m_MarkToMarkAdjustmentRecords: []
m_ShouldReimportFontFeatures: 0
m_FallbackFontAssetTable: []
m_FontWeightTable:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
@ -306,6 +289,33 @@ MonoBehaviour:
boldSpacing: 7
italicStyle: 35
tabSize: 10
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
fallbackFontAssets: []
atlas: {fileID: 0}
--- !u!28 &28268798066460806
Texture2D:
m_ObjectHideFlags: 0
@ -316,17 +326,21 @@ Texture2D:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 4
m_Width: 1
m_Height: 1
m_CompleteImageSize: 1
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 0
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
@ -340,9 +354,11 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_PlatformBlob:
image data: 1
_typelessdata: 00
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<AttributesDef>
<defName>TestGun</defName>
<attack>10</attack>
<defense>3</defense>
<attackSpeed>3</attackSpeed>
<attackRange>10</attackRange>
<attackTargetCount>1</attackTargetCount>
</AttributesDef>
<WeaponDef>
<defName>TestGun</defName>
<label>测试枪</label>
<description>一把测试用的枪</description>
<attributes>TestGun</attributes>
<texture>TestGun</texture>
<itemTexture>TestGunItem</itemTexture>
<bullet>yellowBullet</bullet>
</WeaponDef>
<BulletDef>
<defName>yellowBullet</defName>
<moveSpeed>10</moveSpeed>
<texture>
<path>Resources\Item\YellowBullet.png</path>
</texture>
</BulletDef>
<ImageDef>
<defName>TestGunItem</defName>
<path>Resources\Item\TestGun.png</path>
</ImageDef>
<ImageDef>
<defName>TestGun</defName>
<path>Resources\Item\TestGunUse.png</path>
</ImageDef>
<AttributesDef>
<defName>Claw</defName>
<attack>3</attack>
<defense>1</defense>
<attackSpeed>1</attackSpeed>
<attackRange>1</attackRange>
<attackTargetCount>1</attackTargetCount>
</AttributesDef>
<WeaponDef>
<defName>Claw</defName>
<label>爪子</label>
<description>爪子</description>
<attributes>Claw</attributes>
</WeaponDef>
</Define>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<AttributesDef>
<defName>TestCharacter</defName>
<health>100</health>
<moveSpeed>2</moveSpeed>
</AttributesDef>
<CharacterDef>
<defName>testPawn</defName>
<label>测试小人</label>
<drawingOrder_down>
<DrawNodeDef name="body"/>
</drawingOrder_down>
</CharacterDef>
</Define>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<MonsterAttackDef>
<defName>tenMonster</defName>
<immediate>
<count>10</count>
</immediate>
</MonsterAttackDef>
<MonsterDef>
<defName>cheken</defName>
<label>测试鸡</label>
<aiController>embrace</aiController>
<weapon>Claw</weapon>
</MonsterDef>
</Define>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Define>
<CharacterAttributesDef>
<defName>CatGirl</defName>
<health>100</health>
<moveSpeed>2</moveSpeed>
</CharacterAttributesDef>
<CharacterDef>
<defName>CatGirl</defName>
<label>CatGirl</label>
<description>She is a cat girl with agile movements and sharp senses.</description>
<attributes>CatGirl</attributes> <!-- 引用 AttributesDef 类型的数据块 -->
<drawingOrder_down>CatGirl_down</drawingOrder_down> <!-- 引用 DrawingOrderDef 类型的数据块 -->
<drawingOrder_left>CatGirl_left</drawingOrder_left>
<drawingOrder_right>CatGirl_right</drawingOrder_right>
<drawingOrder_up>CatGirl_up</drawingOrder_up>
</CharacterDef>
<DrawingOrderDef>
<defName>CatGirl_down</defName>
<DrawNodeDef name="body">
<DrawNodeDef name="head">
<DrawNodeDef name="backHair"/>
<DrawNodeDef name="ear" type="animation" FPS="1"/>
<DrawNodeDef name="face"/>
<DrawNodeDef name="frontHair"/>
<DrawNodeDef name="hat"/>
</DrawNodeDef>
<DrawNodeDef name="clothes"/>
</DrawNodeDef>
</DrawingOrderDef>
</Define>

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B