(client)feat:实现子弹定义以及生成,实现初始化动画,实现血条 #43
@ -1,460 +0,0 @@
|
|||||||
%YAML 1.1
|
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
|
||||||
--- !u!1 &4821822984522114009
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 8974533068185241455}
|
|
||||||
- component: {fileID: 6098472552964198111}
|
|
||||||
- component: {fileID: 7844228932229707948}
|
|
||||||
- component: {fileID: 504677424079507256}
|
|
||||||
- component: {fileID: 8276716053524560457}
|
|
||||||
- component: {fileID: 1536012154932022711}
|
|
||||||
m_Layer: 5
|
|
||||||
m_Name: RightMenu
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!224 &8974533068185241455
|
|
||||||
RectTransform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
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: 965650796640655482}
|
|
||||||
- {fileID: 3066961863796270965}
|
|
||||||
- {fileID: 524436111069263832}
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
|
||||||
m_AnchoredPosition: {x: 342, y: -198}
|
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
|
||||||
m_Pivot: {x: 0.1, y: 0.9}
|
|
||||||
--- !u!222 &6098472552964198111
|
|
||||||
CanvasRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
m_CullTransparentMesh: 1
|
|
||||||
--- !u!114 &7844228932229707948
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
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: 1, g: 1, b: 1, a: 0.392}
|
|
||||||
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: 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 &504677424079507256
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 0
|
|
||||||
m_Right: 0
|
|
||||||
m_Top: 0
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 0
|
|
||||||
m_Spacing: 0
|
|
||||||
m_ChildForceExpandWidth: 1
|
|
||||||
m_ChildForceExpandHeight: 1
|
|
||||||
m_ChildControlWidth: 0
|
|
||||||
m_ChildControlHeight: 0
|
|
||||||
m_ChildScaleWidth: 0
|
|
||||||
m_ChildScaleHeight: 0
|
|
||||||
m_ReverseArrangement: 0
|
|
||||||
--- !u!114 &8276716053524560457
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
m_HorizontalFit: 1
|
|
||||||
m_VerticalFit: 1
|
|
||||||
--- !u!114 &1536012154932022711
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 4821822984522114009}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e45cfe2f36eb4f589b6d8f331567974d, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
isGlobal: 1
|
|
||||||
menu: {fileID: 4821822984522114009}
|
|
||||||
buttonPrefab: {fileID: 3166707847097429176, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
--- !u!1001 &1166868423299745271
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 8974533068185241455}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 190104900697248908, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Test
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 160
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 30
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5723833987058492246, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_text
|
|
||||||
value: "\u53D8\u6210\u7B28\u86CB"
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
--- !u!224 &524436111069263832 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1166868423299745271}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1001 &1878011162534849109
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 8974533068185241455}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 190104900697248908, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Control
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 160
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 30
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5723833987058492246, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_text
|
|
||||||
value: "\u64CD\u63A7"
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
--- !u!224 &965650796640655482 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1878011162534849109}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1001 &4460444807628739930
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 8974533068185241455}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 190104900697248908, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Delete
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 190104900697248908, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_IsActive
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.5
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 160
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 30
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5723833987058492246, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
propertyPath: m_text
|
|
||||||
value: "\u5220\u9664"
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
--- !u!224 &3066961863796270965 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 1690722858018107951, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 4460444807628739930}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
@ -40,10 +40,10 @@ TextureImporter:
|
|||||||
wrapU: 0
|
wrapU: 0
|
||||||
wrapV: 0
|
wrapV: 0
|
||||||
wrapW: 0
|
wrapW: 0
|
||||||
nPOTScale: 1
|
nPOTScale: 0
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
spriteMode: 0
|
spriteMode: 1
|
||||||
spriteExtrude: 1
|
spriteExtrude: 1
|
||||||
spriteMeshType: 1
|
spriteMeshType: 1
|
||||||
alignment: 0
|
alignment: 0
|
||||||
@ -100,7 +100,7 @@ TextureImporter:
|
|||||||
customData:
|
customData:
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID:
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
internalID: 0
|
internalID: 0
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
|
@ -130,6 +130,18 @@ PrefabInstance:
|
|||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 8780386748333639840}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: progressBarPrefab
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 8780386748333639840}
|
||||||
- target: {fileID: 3992139212329961548, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
- target: {fileID: 3992139212329961548, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
propertyPath: m_Enabled
|
propertyPath: m_Enabled
|
||||||
value: 0
|
value: 0
|
||||||
@ -139,15 +151,44 @@ PrefabInstance:
|
|||||||
value: Default
|
value: Default
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects:
|
||||||
|
- {fileID: 1328271255896522146, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
m_AddedGameObjects:
|
m_AddedGameObjects:
|
||||||
- targetCorrespondingSourceObject: {fileID: 5549544358816209289, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
- targetCorrespondingSourceObject: {fileID: 5549544358816209289, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
insertIndex: -1
|
insertIndex: -1
|
||||||
addedObject: {fileID: 5706548514770437405}
|
addedObject: {fileID: 5706548514770437405}
|
||||||
m_AddedComponents: []
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 2
|
||||||
|
addedObject: {fileID: 8780386748333639840}
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
--- !u!4 &978302365984264250 stripped
|
--- !u!4 &978302365984264250 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 5549544358816209289, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
m_CorrespondingSourceObject: {fileID: 5549544358816209289, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
m_PrefabInstance: {fileID: 4652308439801383347}
|
m_PrefabInstance: {fileID: 4652308439801383347}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &5530484753491532974 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4652308439801383347}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &8780386748333639840
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5530484753491532974}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fbde354e0bcc4409b3378ee9b698ddc0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
animatorPrefab: {fileID: 0}
|
||||||
|
imagePrefab: {fileID: 0}
|
||||||
|
healthBarPrefab: {fileID: 0}
|
||||||
|
direction: {x: 0, y: 0, z: 0}
|
||||||
|
body: {fileID: 0}
|
||||||
|
affiliation:
|
||||||
|
canSelect: 1
|
||||||
|
hitBarUIShowTime: 5
|
||||||
|
@ -6,7 +6,7 @@ TextureImporter:
|
|||||||
serializedVersion: 13
|
serializedVersion: 13
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 1
|
enableMipMap: 0
|
||||||
sRGBTexture: 1
|
sRGBTexture: 1
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
@ -37,13 +37,13 @@ TextureImporter:
|
|||||||
filterMode: 1
|
filterMode: 1
|
||||||
aniso: 1
|
aniso: 1
|
||||||
mipBias: 0
|
mipBias: 0
|
||||||
wrapU: 0
|
wrapU: 1
|
||||||
wrapV: 0
|
wrapV: 1
|
||||||
wrapW: 0
|
wrapW: 0
|
||||||
nPOTScale: 1
|
nPOTScale: 0
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
spriteMode: 0
|
spriteMode: 1
|
||||||
spriteExtrude: 1
|
spriteExtrude: 1
|
||||||
spriteMeshType: 1
|
spriteMeshType: 1
|
||||||
alignment: 0
|
alignment: 0
|
||||||
@ -52,9 +52,9 @@ TextureImporter:
|
|||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
alphaIsTransparency: 0
|
alphaIsTransparency: 1
|
||||||
spriteTessellationDetail: -1
|
spriteTessellationDetail: -1
|
||||||
textureType: 0
|
textureType: 8
|
||||||
textureShape: 1
|
textureShape: 1
|
||||||
singleChannelComponent: 0
|
singleChannelComponent: 0
|
||||||
flipbookRows: 1
|
flipbookRows: 1
|
||||||
@ -100,7 +100,7 @@ TextureImporter:
|
|||||||
customData:
|
customData:
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID:
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
internalID: 0
|
internalID: 0
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
|
8
Client/Assets/Resources/Prefab/Entity.meta
Normal file
8
Client/Assets/Resources/Prefab/Entity.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 21b4b583171568b45a10dbc2e1fdab10
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,202 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &7193170239846001519
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 564740215097623485, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -9.026831
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: -0.9454966
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: BuildingPrefab Variant
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2985213147343140216}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: outlineCollider
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 2985213147343140216}
|
||||||
|
- target: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: outline
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 6487788869574860317}
|
||||||
|
m_RemovedComponents:
|
||||||
|
- {fileID: 7300440714681954677, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
- {fileID: 1724818962207668775, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
- {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 2
|
||||||
|
addedObject: {fileID: 2985213147343140216}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 3
|
||||||
|
addedObject: {fileID: 6487788869574860317}
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 4
|
||||||
|
addedObject: {fileID: 6245381882962021176}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
--- !u!114 &1196523683669800718 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8307348883874536545, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 7193170239846001519}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 605f185650fe46d89a6e0d60fb8fb11c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &4949477718940635697 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2838206730318674270, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 7193170239846001519}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!212 &6103973223718413091 stripped
|
||||||
|
SpriteRenderer:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 3992139212329961548, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 7193170239846001519}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &8035315966857772658 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 7193170239846001519}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &2985213147343140216
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8035315966857772658}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2ea66d65f9414d18988cbdc1a322e334, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
animatorPrefab: {fileID: 2113064398104960506, guid: ea9af70ce0f4c8b4a9de58ac63074156, type: 3}
|
||||||
|
imagePrefab: {fileID: 1922746734790246249, guid: a6657f26d735fab4690c8185980fda29, type: 3}
|
||||||
|
healthBarPrefab: {fileID: 1196523683669800718}
|
||||||
|
direction: {x: 0, y: 0, z: 0}
|
||||||
|
body: {fileID: 4949477718940635697}
|
||||||
|
affiliation:
|
||||||
|
canSelect: 1
|
||||||
|
hitBarUIShowTime: 5
|
||||||
|
--- !u!114 &6487788869574860317
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8035315966857772658}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ba93dffd1aec4bd5b1ef57df2597ba56, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
rightMenuPrefab: {fileID: 1536012154932022711, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
||||||
|
body: {fileID: 4949477718940635697}
|
||||||
|
outlineRenderer: {fileID: 6103973223718413091}
|
||||||
|
outlineCollider: {fileID: 0}
|
||||||
|
progressBarPrefab: {fileID: 1196523683669800718}
|
||||||
|
entity: {fileID: 2985213147343140216}
|
||||||
|
boxCollider: {fileID: 6245381882962021176}
|
||||||
|
--- !u!61 &6245381882962021176
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8035315966857772658}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_ForceSendLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ForceReceiveLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ContactCaptureLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_CallbackLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_CompositeOperation: 0
|
||||||
|
m_CompositeOrder: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_SpriteTilingProperty:
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
pivot: {x: 0, y: 0}
|
||||||
|
oldSize: {x: 0, y: 0}
|
||||||
|
newSize: {x: 0, y: 0}
|
||||||
|
adaptiveTilingThreshold: 0
|
||||||
|
drawMode: 0
|
||||||
|
adaptiveTiling: 0
|
||||||
|
m_AutoTiling: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_EdgeRadius: 0
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d7b9277d8e6ac4541800044bdb0da063
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,111 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &6246229038671744578
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -1.26556
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: -3.36505
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: BulletPrefab Variant
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 6784914172229929974}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: progressBarPrefab
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1724818962207668775, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_IsTrigger
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 6784914172229929974}
|
||||||
|
m_RemovedComponents:
|
||||||
|
- {fileID: 7300440714681954677, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
- {fileID: 4717642781780051128, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_RemovedGameObjects:
|
||||||
|
- {fileID: 1328271255896522146, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 2
|
||||||
|
addedObject: {fileID: 6784914172229929974}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
--- !u!1 &6557095110834133855 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6246229038671744578}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &6784914172229929974
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6557095110834133855}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3ccb9e42ac9e4492bff031709d2d2e92, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
animatorPrefab: {fileID: 2113064398104960506, guid: ea9af70ce0f4c8b4a9de58ac63074156, type: 3}
|
||||||
|
imagePrefab: {fileID: 1922746734790246249, guid: a6657f26d735fab4690c8185980fda29, type: 3}
|
||||||
|
healthBarPrefab: {fileID: 0}
|
||||||
|
direction: {x: 0, y: 0, z: 0}
|
||||||
|
body: {fileID: 8200005766896563996}
|
||||||
|
affiliation:
|
||||||
|
canSelect: 1
|
||||||
|
hitBarUIShowTime: 5
|
||||||
|
--- !u!1 &8200005766896563996 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2838206730318674270, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6246229038671744578}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 29b2450a8636a104586e36333878f4d9
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,111 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1001 &92380775595425480
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: -0.80437
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: -3.38364
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 697189026367054479, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: CharacterPrefab Variant
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1550000129210799929, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1108911649520063592}
|
||||||
|
- target: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
propertyPath: entity
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1108911649520063592}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents:
|
||||||
|
- targetCorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
insertIndex: 2
|
||||||
|
addedObject: {fileID: 1108911649520063592}
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
--- !u!1 &943601596972592085 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 887327274103887133, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 92380775595425480}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &1108911649520063592
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 943601596972592085}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 757576bb4354ac54da09868e1be02eec, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
animatorPrefab: {fileID: 2113064398104960506, guid: ea9af70ce0f4c8b4a9de58ac63074156, type: 3}
|
||||||
|
imagePrefab: {fileID: 1922746734790246249, guid: a6657f26d735fab4690c8185980fda29, type: 3}
|
||||||
|
healthBarPrefab: {fileID: 8215007830330368681}
|
||||||
|
direction: {x: 0, y: 0, z: 0}
|
||||||
|
body: {fileID: 2750404322221410198}
|
||||||
|
affiliation:
|
||||||
|
canSelect: 1
|
||||||
|
hitBarUIShowTime: 5
|
||||||
|
--- !u!1 &2750404322221410198 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2838206730318674270, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 92380775595425480}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &8215007830330368681 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8307348883874536545, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 92380775595425480}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 605f185650fe46d89a6e0d60fb8fb11c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5218adfb8e855a9459df63de8b2f323c
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -97,10 +97,10 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 697189026367054479}
|
- component: {fileID: 697189026367054479}
|
||||||
- component: {fileID: 3332598847335032684}
|
- component: {fileID: 3332598847335032684}
|
||||||
- component: {fileID: 7300440714681954677}
|
|
||||||
- component: {fileID: 1550000129210799929}
|
- component: {fileID: 1550000129210799929}
|
||||||
- component: {fileID: 1724818962207668775}
|
- component: {fileID: 1724818962207668775}
|
||||||
m_Layer: 0
|
- component: {fileID: 4717642781780051128}
|
||||||
|
m_Layer: 6
|
||||||
m_Name: EntityPrefab
|
m_Name: EntityPrefab
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
@ -122,6 +122,7 @@ Transform:
|
|||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5549544358816209289}
|
- {fileID: 5549544358816209289}
|
||||||
- {fileID: 1697214530303839877}
|
- {fileID: 1697214530303839877}
|
||||||
|
- {fileID: 1404278780950315184}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &3332598847335032684
|
--- !u!114 &3332598847335032684
|
||||||
@ -136,26 +137,8 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b20b1846b9ef47db83c2ac8c4c4e82cb, type: 3}
|
m_Script: {fileID: 11500000, guid: b20b1846b9ef47db83c2ac8c4c4e82cb, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
entity: {fileID: 7300440714681954677}
|
entity: {fileID: 0}
|
||||||
outline: {fileID: 1550000129210799929}
|
outline: {fileID: 1550000129210799929}
|
||||||
--- !u!114 &7300440714681954677
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 887327274103887133}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: fbde354e0bcc4409b3378ee9b698ddc0, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
animatorPrefab: {fileID: 2113064398104960506, guid: ea9af70ce0f4c8b4a9de58ac63074156, type: 3}
|
|
||||||
imagePrefab: {fileID: 1922746734790246249, guid: a6657f26d735fab4690c8185980fda29, type: 3}
|
|
||||||
direction: {x: 0, y: 0, z: 0}
|
|
||||||
body: {fileID: 2838206730318674270}
|
|
||||||
affiliation:
|
|
||||||
canSelect: 1
|
|
||||||
--- !u!114 &1550000129210799929
|
--- !u!114 &1550000129210799929
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -168,10 +151,12 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: acf99b9aa18d4ab9b4ce796d513d476b, type: 3}
|
m_Script: {fileID: 11500000, guid: acf99b9aa18d4ab9b4ce796d513d476b, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
rightMenuPrefab: {fileID: 1536012154932022711, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
||||||
body: {fileID: 2838206730318674270}
|
body: {fileID: 2838206730318674270}
|
||||||
outlineRenderer: {fileID: 3992139212329961548}
|
outlineRenderer: {fileID: 3992139212329961548}
|
||||||
outlineCollider: {fileID: 1724818962207668775}
|
outlineCollider: {fileID: 1724818962207668775}
|
||||||
entity: {fileID: 7300440714681954677}
|
progressBarPrefab: {fileID: 8307348883874536545}
|
||||||
|
entity: {fileID: 0}
|
||||||
--- !u!70 &1724818962207668775
|
--- !u!70 &1724818962207668775
|
||||||
CapsuleCollider2D:
|
CapsuleCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -209,6 +194,33 @@ CapsuleCollider2D:
|
|||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 1, y: 1}
|
||||||
m_Direction: 0
|
m_Direction: 0
|
||||||
|
--- !u!50 &4717642781780051128
|
||||||
|
Rigidbody2D:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 887327274103887133}
|
||||||
|
m_BodyType: 0
|
||||||
|
m_Simulated: 1
|
||||||
|
m_UseFullKinematicContacts: 0
|
||||||
|
m_UseAutoMass: 0
|
||||||
|
m_Mass: 1
|
||||||
|
m_LinearDamping: 0
|
||||||
|
m_AngularDamping: 0.05
|
||||||
|
m_GravityScale: 0
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_SleepingMode: 1
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
m_Constraints: 4
|
||||||
--- !u!1 &2838206730318674270
|
--- !u!1 &2838206730318674270
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -240,3 +252,80 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 697189026367054479}
|
m_Father: {fileID: 697189026367054479}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1001 &3478909419655914534
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransformParent: {fileID: 697189026367054479}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 2461610838990723460, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: ProgressBar
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2461610838990723460, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: -0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_RemovedGameObjects: []
|
||||||
|
m_AddedGameObjects: []
|
||||||
|
m_AddedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
--- !u!4 &1404278780950315184 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 2538501538304779414, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3478909419655914534}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!114 &8307348883874536545 stripped
|
||||||
|
MonoBehaviour:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 4831852659840235591, guid: c9e9ee0f8c58b5b45b2e85c7de8251b0, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3478909419655914534}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 605f185650fe46d89a6e0d60fb8fb11c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
223
Client/Assets/Resources/Prefab/ProgressBar.prefab
Normal file
223
Client/Assets/Resources/Prefab/ProgressBar.prefab
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1422760980158139632
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6758793997642361128}
|
||||||
|
- component: {fileID: 3249131573413190125}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Square
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6758793997642361128
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1422760980158139632}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0.5, y: 0, z: -0.1}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6523508484757961969}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &3249131573413190125
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1422760980158139632}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||||
|
m_Color: {r: 0.5188679, g: 0.09545213, b: 0.09545213, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &2461610838990723460
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2538501538304779414}
|
||||||
|
- component: {fileID: 9043291113494845527}
|
||||||
|
- component: {fileID: 4831852659840235591}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ProgressBar
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &2538501538304779414
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2461610838990723460}
|
||||||
|
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: 0.1, z: 0.1}
|
||||||
|
m_ConstrainProportionsScale: 1
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6523508484757961969}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &9043291113494845527
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2461610838990723460}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!114 &4831852659840235591
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2461610838990723460}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 605f185650fe46d89a6e0d60fb8fb11c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_progress: {fileID: 2916926755211552789}
|
||||||
|
--- !u!1 &2916926755211552789
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6523508484757961969}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: GameObject
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6523508484757961969
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2916926755211552789}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -0.5, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6758793997642361128}
|
||||||
|
m_Father: {fileID: 2538501538304779414}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
7
Client/Assets/Resources/Prefab/ProgressBar.prefab.meta
Normal file
7
Client/Assets/Resources/Prefab/ProgressBar.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c9e9ee0f8c58b5b45b2e85c7de8251b0
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
134
Client/Assets/Resources/Prefab/RightMenu.prefab
Normal file
134
Client/Assets/Resources/Prefab/RightMenu.prefab
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4821822984522114009
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8974533068185241455}
|
||||||
|
- component: {fileID: 6098472552964198111}
|
||||||
|
- component: {fileID: 7844228932229707948}
|
||||||
|
- component: {fileID: 504677424079507256}
|
||||||
|
- component: {fileID: 8276716053524560457}
|
||||||
|
- component: {fileID: 1536012154932022711}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: RightMenu
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8974533068185241455
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
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, y: 1}
|
||||||
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 342, y: -198}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.1, y: 0.9}
|
||||||
|
--- !u!222 &6098472552964198111
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &7844228932229707948
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
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: 1, g: 1, b: 1, a: 0.392}
|
||||||
|
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: 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 &504677424079507256
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Padding:
|
||||||
|
m_Left: 0
|
||||||
|
m_Right: 0
|
||||||
|
m_Top: 0
|
||||||
|
m_Bottom: 0
|
||||||
|
m_ChildAlignment: 0
|
||||||
|
m_Spacing: 0
|
||||||
|
m_ChildForceExpandWidth: 1
|
||||||
|
m_ChildForceExpandHeight: 1
|
||||||
|
m_ChildControlWidth: 0
|
||||||
|
m_ChildControlHeight: 0
|
||||||
|
m_ChildScaleWidth: 0
|
||||||
|
m_ChildScaleHeight: 0
|
||||||
|
m_ReverseArrangement: 0
|
||||||
|
--- !u!114 &8276716053524560457
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 1
|
||||||
|
m_VerticalFit: 1
|
||||||
|
--- !u!114 &1536012154932022711
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4821822984522114009}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: e45cfe2f36eb4f589b6d8f331567974d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
menu: {fileID: 4821822984522114009}
|
||||||
|
buttonPrefab: {fileID: 3166707847097429176, guid: f0afd08be12de0d43af753af4f618da4, type: 3}
|
8
Client/Assets/Resources/Prefab/UI.meta
Normal file
8
Client/Assets/Resources/Prefab/UI.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8ceedab54889f704fb47118b2aee7ada
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -119,6 +119,93 @@ NavMeshSettings:
|
|||||||
debug:
|
debug:
|
||||||
m_Flags: 0
|
m_Flags: 0
|
||||||
m_NavMeshData: {fileID: 0}
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &111982856
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 111982858}
|
||||||
|
- component: {fileID: 111982857}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: SelectRect
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!212 &111982857
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 111982856}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||||
|
m_RayTracingAccelStructBuildFlags: 1
|
||||||
|
m_SmallMeshCulling: 1
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 811d3d3bfa653494784ee8ed56956471, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 1
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!4 &111982858
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 111982856}
|
||||||
|
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 &164739120
|
--- !u!1 &164739120
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -149,8 +236,9 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
isGlobal: 1
|
isGlobal: 1
|
||||||
entityLevel: {fileID: 1891846098}
|
characterPrefab: {fileID: 3420474218334607780, guid: 5218adfb8e855a9459df63de8b2f323c, type: 3}
|
||||||
entityPrefab: {fileID: 3332598847335032684, guid: 6cd8b01a0f57372438dc30c864ae1530, type: 3}
|
buildingPrefab: {fileID: 5615006624229444611, guid: d7b9277d8e6ac4541800044bdb0da063, type: 3}
|
||||||
|
bulletPrefab: {fileID: 8687677644466399534, guid: 29b2450a8636a104586e36333878f4d9, type: 3}
|
||||||
defaultEntityPrefab: {fileID: 7975757421877276383, guid: 89661daa5f100c64783f0ad9cd37a7ff, type: 3}
|
defaultEntityPrefab: {fileID: 7975757421877276383, guid: 89661daa5f100c64783f0ad9cd37a7ff, type: 3}
|
||||||
--- !u!4 &164739122
|
--- !u!4 &164739122
|
||||||
Transform:
|
Transform:
|
||||||
@ -161,7 +249,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 164739120}
|
m_GameObject: {fileID: 164739120}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -0.54611, y: -0.12631, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
@ -246,6 +334,37 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &466785510
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 466785511}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: BulletLevel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &466785511
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 466785510}
|
||||||
|
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: 1423222968}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &603423466
|
--- !u!1 &603423466
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -318,6 +437,37 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
isGlobal: 1
|
isGlobal: 1
|
||||||
|
--- !u!1 &651025902
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 651025903}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: BuildingLevel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &651025903
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 651025902}
|
||||||
|
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: 1423222968}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &689345800 stripped
|
--- !u!224 &689345800 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 2322698135530781468, guid: afbed11ea0c7e944aa36a71951b00ad6, type: 3}
|
m_CorrespondingSourceObject: {fileID: 2322698135530781468, guid: afbed11ea0c7e944aa36a71951b00ad6, type: 3}
|
||||||
@ -354,7 +504,6 @@ Transform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1084213391}
|
- {fileID: 1084213391}
|
||||||
- {fileID: 1404524260}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &741561708
|
--- !u!114 &741561708
|
||||||
@ -369,8 +518,9 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 81339b242c794b8d9d28d7111a46bfbf, type: 3}
|
m_Script: {fileID: 11500000, guid: 81339b242c794b8d9d28d7111a46bfbf, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
isGlobal: 1
|
||||||
baseLevel: {fileID: 1084213392}
|
baseLevel: {fileID: 1084213392}
|
||||||
buildLevel: {fileID: 2005635200}
|
buildLevel: {fileID: 0}
|
||||||
plantLevel: {fileID: 0}
|
plantLevel: {fileID: 0}
|
||||||
--- !u!1 &828003921
|
--- !u!1 &828003921
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -383,6 +533,7 @@ GameObject:
|
|||||||
- component: {fileID: 828003922}
|
- component: {fileID: 828003922}
|
||||||
- component: {fileID: 828003924}
|
- component: {fileID: 828003924}
|
||||||
- component: {fileID: 828003923}
|
- component: {fileID: 828003923}
|
||||||
|
- component: {fileID: 828003925}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Tilemap
|
m_Name: Tilemap
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -495,6 +646,91 @@ Tilemap:
|
|||||||
e31: 0
|
e31: 0
|
||||||
e32: 0
|
e32: 0
|
||||||
e33: 1
|
e33: 1
|
||||||
|
--- !u!19719996 &828003925
|
||||||
|
TilemapCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 828003921}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_ForceSendLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ForceReceiveLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ContactCaptureLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_CallbackLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_CompositeOperation: 0
|
||||||
|
m_CompositeOrder: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_MaximumTileChangeCount: 1000
|
||||||
|
m_ExtrusionFactor: 0
|
||||||
|
m_UseDelaunayMesh: 0
|
||||||
|
--- !u!1 &904176939
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 904176941}
|
||||||
|
- component: {fileID: 904176940}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightMenu
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &904176940
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 904176939}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 409b8017bbd6443eb2dde17ea6fd5e29, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isGlobal: 1
|
||||||
|
_canvas: {fileID: 0}
|
||||||
|
_rightMenuPrefab: {fileID: 0}
|
||||||
|
--- !u!4 &904176941
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 904176939}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 905.6242, y: 443.88705, 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 &1084213390
|
--- !u!1 &1084213390
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -541,6 +777,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
textureLevel: {fileID: 828003924}
|
textureLevel: {fileID: 828003924}
|
||||||
|
dataOffset: {x: 0, y: 0}
|
||||||
--- !u!1 &1236970682
|
--- !u!1 &1236970682
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -639,7 +876,6 @@ RectTransform:
|
|||||||
- {fileID: 2068504032}
|
- {fileID: 2068504032}
|
||||||
- {fileID: 1672332560}
|
- {fileID: 1672332560}
|
||||||
- {fileID: 1401161120}
|
- {fileID: 1401161120}
|
||||||
- {fileID: 2120445621}
|
|
||||||
- {fileID: 689345800}
|
- {fileID: 689345800}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -729,8 +965,8 @@ Camera:
|
|||||||
m_GameObject: {fileID: 1239746123}
|
m_GameObject: {fileID: 1239746123}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 1
|
m_ClearFlags: 2
|
||||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
m_BackGroundColor: {r: 0.26415092, g: 0.26415092, b: 0.26415092, a: 0}
|
||||||
m_projectionMatrixMode: 1
|
m_projectionMatrixMode: 1
|
||||||
m_GateFitMode: 2
|
m_GateFitMode: 2
|
||||||
m_FOVAxisMode: 0
|
m_FOVAxisMode: 0
|
||||||
@ -805,7 +1041,7 @@ RectTransform:
|
|||||||
m_CorrespondingSourceObject: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
|
m_CorrespondingSourceObject: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
|
||||||
m_PrefabInstance: {fileID: 561707863834017811}
|
m_PrefabInstance: {fileID: 561707863834017811}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &1404524259
|
--- !u!1 &1423222967
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@ -813,43 +1049,32 @@ GameObject:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1404524260}
|
- component: {fileID: 1423222968}
|
||||||
- component: {fileID: 1404524261}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Building
|
m_Name: Entity
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 1
|
||||||
--- !u!4 &1404524260
|
--- !u!4 &1423222968
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1404524259}
|
m_GameObject: {fileID: 1423222967}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: -1}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 2005635202}
|
- {fileID: 1891846100}
|
||||||
m_Father: {fileID: 741561707}
|
- {fileID: 651025903}
|
||||||
|
- {fileID: 466785511}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!156049354 &1404524261
|
|
||||||
Grid:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1404524259}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CellSize: {x: 1, y: 1, z: 0}
|
|
||||||
m_CellGap: {x: 0, y: 0, z: 0}
|
|
||||||
m_CellLayout: 0
|
|
||||||
m_CellSwizzle: 0
|
|
||||||
--- !u!1 &1468918169
|
--- !u!1 &1468918169
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -935,151 +1160,23 @@ Transform:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1891846098}
|
m_GameObject: {fileID: 1891846098}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 1423222968}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!224 &1892335252 stripped
|
--- !u!224 &1892335252 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 4227482396833377269, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
m_CorrespondingSourceObject: {fileID: 4227482396833377269, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
m_PrefabInstance: {fileID: 481559811017721991}
|
m_PrefabInstance: {fileID: 481559811017721991}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &2005635199
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 2005635202}
|
|
||||||
- component: {fileID: 2005635200}
|
|
||||||
- component: {fileID: 2005635201}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: Tilemap
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!1839735485 &2005635200
|
|
||||||
Tilemap:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2005635199}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_Tiles: {}
|
|
||||||
m_AnimatedTiles: {}
|
|
||||||
m_TileAssetArray: []
|
|
||||||
m_TileSpriteArray: []
|
|
||||||
m_TileMatrixArray: []
|
|
||||||
m_TileColorArray: []
|
|
||||||
m_TileObjectToInstantiateArray: []
|
|
||||||
m_AnimationFrameRate: 1
|
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
|
||||||
m_Origin: {x: 0, y: 0, z: 0}
|
|
||||||
m_Size: {x: 0, y: 0, z: 1}
|
|
||||||
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
|
|
||||||
m_TileOrientation: 0
|
|
||||||
m_TileOrientationMatrix:
|
|
||||||
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
|
|
||||||
--- !u!483693784 &2005635201
|
|
||||||
TilemapRenderer:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2005635199}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_CastShadows: 0
|
|
||||||
m_ReceiveShadows: 0
|
|
||||||
m_DynamicOccludee: 1
|
|
||||||
m_StaticShadowCaster: 0
|
|
||||||
m_MotionVectors: 1
|
|
||||||
m_LightProbeUsage: 0
|
|
||||||
m_ReflectionProbeUsage: 0
|
|
||||||
m_RayTracingMode: 0
|
|
||||||
m_RayTraceProcedural: 0
|
|
||||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
|
||||||
m_RayTracingAccelStructBuildFlags: 1
|
|
||||||
m_SmallMeshCulling: 1
|
|
||||||
m_RenderingLayerMask: 1
|
|
||||||
m_RendererPriority: 0
|
|
||||||
m_Materials:
|
|
||||||
- {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
|
||||||
m_StaticBatchInfo:
|
|
||||||
firstSubMesh: 0
|
|
||||||
subMeshCount: 0
|
|
||||||
m_StaticBatchRoot: {fileID: 0}
|
|
||||||
m_ProbeAnchor: {fileID: 0}
|
|
||||||
m_LightProbeVolumeOverride: {fileID: 0}
|
|
||||||
m_ScaleInLightmap: 1
|
|
||||||
m_ReceiveGI: 1
|
|
||||||
m_PreserveUVs: 0
|
|
||||||
m_IgnoreNormalsForChartDetection: 0
|
|
||||||
m_ImportantGI: 0
|
|
||||||
m_StitchLightmapSeams: 1
|
|
||||||
m_SelectedEditorRenderState: 0
|
|
||||||
m_MinimumChartSize: 4
|
|
||||||
m_AutoUVMaxDistance: 0.5
|
|
||||||
m_AutoUVMaxAngle: 89
|
|
||||||
m_LightmapParameters: {fileID: 0}
|
|
||||||
m_SortingLayerID: 0
|
|
||||||
m_SortingLayer: 0
|
|
||||||
m_SortingOrder: 0
|
|
||||||
m_ChunkSize: {x: 32, y: 32, z: 32}
|
|
||||||
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
|
|
||||||
m_MaxChunkCount: 16
|
|
||||||
m_MaxFrameAge: 16
|
|
||||||
m_SortOrder: 0
|
|
||||||
m_Mode: 0
|
|
||||||
m_DetectChunkCullingBounds: 0
|
|
||||||
m_MaskInteraction: 0
|
|
||||||
--- !u!4 &2005635202
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2005635199}
|
|
||||||
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: 1404524260}
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!224 &2068504032 stripped
|
--- !u!224 &2068504032 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 6806539210387795853, guid: 620f2670398686943a232c5a71a6f1d5, type: 3}
|
m_CorrespondingSourceObject: {fileID: 6806539210387795853, guid: 620f2670398686943a232c5a71a6f1d5, type: 3}
|
||||||
m_PrefabInstance: {fileID: 6268679642209076924}
|
m_PrefabInstance: {fileID: 6268679642209076924}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!224 &2120445621 stripped
|
|
||||||
RectTransform:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 2673299386314699482}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!1001 &481559811017721991
|
--- !u!1001 &481559811017721991
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1120,6 +1217,22 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2938422591565110871, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
|
propertyPath: m_Spacing.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2938422591565110871, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
|
propertyPath: m_Padding.m_Top
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 2938422591565110871, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
|
propertyPath: m_ChildAlignment
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3070964228632539618, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 4
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4028021113825693505, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
- target: {fileID: 4028021113825693505, guid: 72cde32427f7d914692a7b0d22fb791d, type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 1
|
value: 1
|
||||||
@ -1366,155 +1479,6 @@ PrefabInstance:
|
|||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 97884168f61531647ba02870b2e2160f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 97884168f61531647ba02870b2e2160f, type: 3}
|
||||||
--- !u!1001 &2673299386314699482
|
|
||||||
PrefabInstance:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Modification:
|
|
||||||
serializedVersion: 3
|
|
||||||
m_TransformParent: {fileID: 1236970686}
|
|
||||||
m_Modifications:
|
|
||||||
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4821822984522114009, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: RightMenu
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 4821822984522114009, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_IsActive
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_Pivot.x
|
|
||||||
value: 0.1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_Pivot.y
|
|
||||||
value: 0.9
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMax.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchorMin.y
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_SizeDelta.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalPosition.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.w
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.x
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.y
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalRotation.z
|
|
||||||
value: -0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.x
|
|
||||||
value: 342
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_AnchoredPosition.y
|
|
||||||
value: -198
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.x
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.y
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
propertyPath: m_LocalEulerAnglesHint.z
|
|
||||||
value: 0
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
|
||||||
m_RemovedGameObjects: []
|
|
||||||
m_AddedGameObjects: []
|
|
||||||
m_AddedComponents: []
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
|
|
||||||
--- !u!1001 &3215589691918074709
|
--- !u!1001 &3215589691918074709
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1781,6 +1745,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7402578691222625163, guid: 1b140ccde6242874785fb30e18322eab, type: 3}
|
||||||
|
propertyPath: focusBox
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 111982856}
|
||||||
- target: {fileID: 8654739876786722101, guid: 1b140ccde6242874785fb30e18322eab, type: 3}
|
- target: {fileID: 8654739876786722101, guid: 1b140ccde6242874785fb30e18322eab, type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
value: 0.5
|
value: 0.5
|
||||||
@ -1875,5 +1843,7 @@ SceneRoots:
|
|||||||
- {fileID: 741561707}
|
- {fileID: 741561707}
|
||||||
- {fileID: 1236970686}
|
- {fileID: 1236970686}
|
||||||
- {fileID: 603423468}
|
- {fileID: 603423468}
|
||||||
- {fileID: 1891846100}
|
|
||||||
- {fileID: 164739122}
|
- {fileID: 164739122}
|
||||||
|
- {fileID: 1423222968}
|
||||||
|
- {fileID: 111982858}
|
||||||
|
- {fileID: 904176941}
|
1211
Client/Assets/Scenes/Initiate.unity
Normal file
1211
Client/Assets/Scenes/Initiate.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Client/Assets/Scenes/Initiate.unity.meta
Normal file
7
Client/Assets/Scenes/Initiate.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 843cfe07c63263c42bae7362250d568e
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -11,7 +11,7 @@ namespace AI
|
|||||||
public abstract JobBase GetJob(Entity.Entity target);
|
public abstract JobBase GetJob(Entity.Entity target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Selector : AIBase
|
public class ThinkNode_Selector : AIBase
|
||||||
{
|
{
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
{
|
{
|
||||||
@ -24,13 +24,13 @@ namespace AI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class ConditionalAI : Selector
|
public class ThinkNode_Conditional : ThinkNode_Selector
|
||||||
{
|
{
|
||||||
// 条件函数,返回 true 表示满足条件
|
// 条件函数,返回 true 表示满足条件
|
||||||
private Func<Entity.Entity, bool> condition;
|
private Func<Entity.Entity, bool> condition;
|
||||||
|
|
||||||
// 构造函数,传入条件函数
|
// 构造函数,传入条件函数
|
||||||
public ConditionalAI(Func<Entity.Entity, bool> conditionFunc)
|
public ThinkNode_Conditional(Func<Entity.Entity, bool> conditionFunc)
|
||||||
{
|
{
|
||||||
condition = conditionFunc;
|
condition = conditionFunc;
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ namespace AI
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class SequenceAI : AIBase
|
public class ThinkNode_Sequence : AIBase
|
||||||
{
|
{
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
{
|
{
|
||||||
@ -61,33 +61,5 @@ namespace AI
|
|||||||
return null; // 所有子节点完成时返回 null
|
return null; // 所有子节点完成时返回 null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class ContinuousMove : AIBase
|
|
||||||
{
|
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
|
||||||
{
|
|
||||||
return new MoveJob();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TrackPlayer : AIBase
|
|
||||||
{
|
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
|
||||||
{
|
|
||||||
return new TrackPlayerJob();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class RandomWander : AIBase
|
|
||||||
{
|
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
|
||||||
{
|
|
||||||
return new WanderJob();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public class Idel : AIBase
|
|
||||||
{
|
|
||||||
public override JobBase GetJob(Entity.Entity target)
|
|
||||||
{
|
|
||||||
return new IdleJob();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -77,7 +77,7 @@ namespace AI
|
|||||||
public class TrackPlayerJob : JobBase
|
public class TrackPlayerJob : JobBase
|
||||||
{
|
{
|
||||||
private EntityPrefab currentTarget; // 当前追踪的目标玩家
|
private EntityPrefab currentTarget; // 当前追踪的目标玩家
|
||||||
private List<EntityPrefab> players; // 玩家实体列表
|
private LinkedList<EntityPrefab> players; // 玩家实体列表
|
||||||
|
|
||||||
public override void StartJob(Entity.Entity target)
|
public override void StartJob(Entity.Entity target)
|
||||||
{
|
{
|
||||||
@ -87,13 +87,13 @@ namespace AI
|
|||||||
|
|
||||||
protected override void UpdateJob()
|
protected override void UpdateJob()
|
||||||
{
|
{
|
||||||
if (currentTarget == null || currentTarget.entity.IsDead)
|
if (!currentTarget || currentTarget.entity.IsDead)
|
||||||
{
|
{
|
||||||
// 如果当前目标无效,则重新查找最近的玩家
|
// 如果当前目标无效,则重新查找最近的玩家
|
||||||
UpdateTarget();
|
UpdateTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTarget != null)
|
if (currentTarget)
|
||||||
{
|
{
|
||||||
var targetPosition = new Vector3(currentTarget.Position.x, currentTarget.Position.y, 0);
|
var targetPosition = new Vector3(currentTarget.Position.x, currentTarget.Position.y, 0);
|
||||||
entity.SetTarget(targetPosition);
|
entity.SetTarget(targetPosition);
|
||||||
@ -114,7 +114,7 @@ namespace AI
|
|||||||
currentTarget = GetNearestPlayer(players);
|
currentTarget = GetNearestPlayer(players);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EntityPrefab GetNearestPlayer(List<EntityPrefab> players)
|
private EntityPrefab GetNearestPlayer(LinkedList<EntityPrefab> players)
|
||||||
{
|
{
|
||||||
EntityPrefab nearestPlayer = null;
|
EntityPrefab nearestPlayer = null;
|
||||||
float minDistance = float.MaxValue;
|
float minDistance = float.MaxValue;
|
||||||
@ -144,7 +144,7 @@ namespace AI
|
|||||||
|
|
||||||
protected override void UpdateJob()
|
protected override void UpdateJob()
|
||||||
{
|
{
|
||||||
if (player == null || !IsPlayerInRange())
|
if (!player || !IsPlayerInRange())
|
||||||
{
|
{
|
||||||
StopJob(); // 如果玩家不在范围内,停止攻击工作
|
StopJob(); // 如果玩家不在范围内,停止攻击工作
|
||||||
return;
|
return;
|
||||||
@ -167,11 +167,11 @@ namespace AI
|
|||||||
base.StartJob(target);
|
base.StartJob(target);
|
||||||
|
|
||||||
// 查找最近的玩家作为目标
|
// 查找最近的玩家作为目标
|
||||||
List<EntityPrefab> players = Managers.EntityManage.Instance.FindEntitiesByFaction("Player");
|
LinkedList<EntityPrefab> players = Managers.EntityManage.Instance.FindEntitiesByFaction("Player");
|
||||||
player = GetNearestPlayer(players);
|
player = GetNearestPlayer(players);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EntityPrefab GetNearestPlayer(List<EntityPrefab> players)
|
private EntityPrefab GetNearestPlayer(LinkedList<EntityPrefab> players)
|
||||||
{
|
{
|
||||||
EntityPrefab nearestPlayer = null;
|
EntityPrefab nearestPlayer = null;
|
||||||
float minDistance = float.MaxValue;
|
float minDistance = float.MaxValue;
|
||||||
@ -197,7 +197,7 @@ namespace AI
|
|||||||
|
|
||||||
private bool IsPlayerValid(EntityPrefab player)
|
private bool IsPlayerValid(EntityPrefab player)
|
||||||
{
|
{
|
||||||
return player != null && !player.entity.IsDead;
|
return player && !player.entity.IsDead;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class RangedAttackJob : JobBase
|
public class RangedAttackJob : JobBase
|
||||||
@ -206,7 +206,7 @@ namespace AI
|
|||||||
|
|
||||||
protected override void UpdateJob()
|
protected override void UpdateJob()
|
||||||
{
|
{
|
||||||
if (player == null || !IsPlayerValid(player))
|
if (!player || !IsPlayerValid(player))
|
||||||
{
|
{
|
||||||
StopJob(); // 如果当前目标无效,停止工作
|
StopJob(); // 如果当前目标无效,停止工作
|
||||||
return;
|
return;
|
||||||
@ -256,11 +256,11 @@ namespace AI
|
|||||||
base.StartJob(target);
|
base.StartJob(target);
|
||||||
|
|
||||||
// 查找最近的玩家作为目标
|
// 查找最近的玩家作为目标
|
||||||
List<EntityPrefab> players = Managers.EntityManage.Instance.FindEntitiesByFaction("Player");
|
var players = Managers.EntityManage.Instance.FindEntitiesByFaction("Player");
|
||||||
player = GetNearestPlayer(players);
|
player = GetNearestPlayer(players);
|
||||||
}
|
}
|
||||||
|
|
||||||
private EntityPrefab GetNearestPlayer(List<EntityPrefab> players)
|
private EntityPrefab GetNearestPlayer(LinkedList<EntityPrefab> players)
|
||||||
{
|
{
|
||||||
EntityPrefab nearestPlayer = null;
|
EntityPrefab nearestPlayer = null;
|
||||||
float minDistance = float.MaxValue;
|
float minDistance = float.MaxValue;
|
||||||
@ -286,7 +286,7 @@ namespace AI
|
|||||||
|
|
||||||
private bool IsPlayerValid(EntityPrefab player)
|
private bool IsPlayerValid(EntityPrefab player)
|
||||||
{
|
{
|
||||||
return player != null && !player.entity.IsDead;
|
return player && !player.entity.IsDead;
|
||||||
}
|
}
|
||||||
|
|
||||||
private const float MaxTrackDistance = 20f; // 最大追踪距离
|
private const float MaxTrackDistance = 20f; // 最大追踪距离
|
||||||
|
33
Client/Assets/Scripts/AI/JobGiver.cs
Normal file
33
Client/Assets/Scripts/AI/JobGiver.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
namespace AI
|
||||||
|
{
|
||||||
|
public class JobGiver_ContinuousMove : AIBase
|
||||||
|
{
|
||||||
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
|
{
|
||||||
|
return new MoveJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JobGiver_Enemies : AIBase
|
||||||
|
{
|
||||||
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
|
{
|
||||||
|
return new TrackPlayerJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class JobGiver_RandomWander : AIBase
|
||||||
|
{
|
||||||
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
|
{
|
||||||
|
return new WanderJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class JobGiver_Idel : AIBase
|
||||||
|
{
|
||||||
|
public override JobBase GetJob(Entity.Entity target)
|
||||||
|
{
|
||||||
|
return new IdleJob();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
3
Client/Assets/Scripts/AI/JobGiver.cs.meta
Normal file
3
Client/Assets/Scripts/AI/JobGiver.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 30648f750dce43e493f5e94cb735988c
|
||||||
|
timeCreated: 1754974329
|
151
Client/Assets/Scripts/Base/GradientColor.cs
Normal file
151
Client/Assets/Scripts/Base/GradientColor.cs
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Base
|
||||||
|
{
|
||||||
|
// 定义渐变方向枚举
|
||||||
|
[AddComponentMenu("UI/Effects/Gradient")]
|
||||||
|
public enum Dir
|
||||||
|
{
|
||||||
|
Horizontal, // 水平方向
|
||||||
|
Vertical, // 垂直方向
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义梯度效果类,继承自BaseMeshEffect
|
||||||
|
public class Gradient : BaseMeshEffect
|
||||||
|
{
|
||||||
|
[SerializeField] // 序列化字段,可在Inspector中编辑
|
||||||
|
private Dir dir = Dir.Vertical; // 渐变方向,默认垂直
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
public Color32 color1 = Color.white; // 渐变起始颜色,默认白色
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
public Color32 color2 = Color.white; // 渐变结束颜色,默认白色
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private float range = 0f; // 渐变范围,控制颜色的过渡区域,默认无范围(完全渐变)
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private bool isFlip = false; // 是否翻转渐变方向,默认不翻转
|
||||||
|
|
||||||
|
|
||||||
|
public void Refresh()
|
||||||
|
{
|
||||||
|
graphic.SetVerticesDirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重写ModifyMesh方法,用于修改UI元素的网格
|
||||||
|
public override void ModifyMesh(VertexHelper vh)
|
||||||
|
{
|
||||||
|
if (!IsActive()) // 如果组件未激活,则不执行后续操作
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var count = vh.currentVertCount; // 获取当前顶点数量
|
||||||
|
if (count > 0) // 如果有顶点,则进行处理
|
||||||
|
{
|
||||||
|
var vertices = new List<UIVertex>(); // 创建顶点列表
|
||||||
|
|
||||||
|
// 遍历所有顶点并添加到列表中
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var uIVertex = new UIVertex();
|
||||||
|
vh.PopulateUIVertex(ref uIVertex, i); // 填充顶点信息
|
||||||
|
vertices.Add(uIVertex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据渐变方向调用相应的绘制方法
|
||||||
|
switch (dir)
|
||||||
|
{
|
||||||
|
case Dir.Horizontal:
|
||||||
|
DrawHorizontal(vh, vertices, count);
|
||||||
|
break;
|
||||||
|
case Dir.Vertical:
|
||||||
|
DrawVertical(vh, vertices, count);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制垂直方向的渐变
|
||||||
|
private void DrawVertical(VertexHelper vh, List<UIVertex> vertices, int count)
|
||||||
|
{
|
||||||
|
// 初始化顶部和底部Y坐标
|
||||||
|
var topY = vertices[0].position.y;
|
||||||
|
var bottomY = vertices[0].position.y;
|
||||||
|
|
||||||
|
// 遍历所有顶点,找到最高和最低的Y坐标
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var y = vertices[i].position.y;
|
||||||
|
if (y > topY) topY = y;
|
||||||
|
else if (y < bottomY) bottomY = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
var height = topY - bottomY; // 计算高度差
|
||||||
|
|
||||||
|
// 遍历所有顶点,设置颜色渐变
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var vertex = vertices[i];
|
||||||
|
Color32 color = Color.white;
|
||||||
|
|
||||||
|
// 根据是否翻转,计算当前顶点的颜色
|
||||||
|
if (isFlip)
|
||||||
|
{
|
||||||
|
color = Color32.Lerp(color2, color1, 1 - (vertex.position.y - bottomY) / height * (1f - range));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = Color32.Lerp(color2, color1, (vertex.position.y - bottomY) / height * (1f - range));
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex.color = color; // 设置顶点颜色
|
||||||
|
vh.SetUIVertex(vertex, i); // 更新网格中的顶点
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制水平方向的渐变
|
||||||
|
private void DrawHorizontal(VertexHelper vh, List<UIVertex> vertices, int count)
|
||||||
|
{
|
||||||
|
// 注意:这里应该是找到最左和最右的X坐标,注释中存在笔误
|
||||||
|
var leftX = vertices[0].position.x;
|
||||||
|
var rightX = vertices[0].position.x;
|
||||||
|
|
||||||
|
// 遍历所有顶点,找到最左和最右的X坐标
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var x = vertices[i].position.x;
|
||||||
|
if (x > rightX) rightX = x;
|
||||||
|
else if (x < leftX) leftX = x;
|
||||||
|
}
|
||||||
|
|
||||||
|
var width = rightX - leftX; // 计算宽度差
|
||||||
|
|
||||||
|
// 遍历所有顶点,设置颜色渐变
|
||||||
|
for (var i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
var vertex = vertices[i];
|
||||||
|
Color32 color = Color.white;
|
||||||
|
|
||||||
|
// 根据是否翻转,计算当前顶点的颜色
|
||||||
|
if (isFlip)
|
||||||
|
{
|
||||||
|
color = Color32.Lerp(color2, color1, 1 - (vertex.position.x - leftX) / width * (1f - range));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = Color32.Lerp(color2, color1, (vertex.position.x - leftX) / width * (1f - range));
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex.color = color; // 设置顶点颜色
|
||||||
|
vh.SetUIVertex(vertex, i); // 更新网格中的顶点
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
Client/Assets/Scripts/Base/GradientColor.cs.meta
Normal file
2
Client/Assets/Scripts/Base/GradientColor.cs.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8df3d16a358d74644b86e92ca5177fa1
|
150
Client/Assets/Scripts/Base/Launcher.cs
Normal file
150
Client/Assets/Scripts/Base/Launcher.cs
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using Logging;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Base
|
||||||
|
{
|
||||||
|
|
||||||
|
public class Launcher : MonoBehaviour
|
||||||
|
{
|
||||||
|
public GameObject loadingUI;
|
||||||
|
public Gradient progressBar; // 渐变色条
|
||||||
|
public TMP_Text describeText; // 描述文本
|
||||||
|
|
||||||
|
public float duration = 0.5f; // 过渡时间
|
||||||
|
public float fadeDuration = 2f; // 不透明度渐隐的时间
|
||||||
|
private float _currentProgress = 0f; // 当前进度
|
||||||
|
|
||||||
|
private Color textColor;
|
||||||
|
|
||||||
|
|
||||||
|
private readonly string[] _loadingSteps =
|
||||||
|
{
|
||||||
|
"初始化日志", "正在载入定义", "正在加载图片资源", "正在切割瓦片", "正在加载区分派系",
|
||||||
|
"正在加载物品"
|
||||||
|
};
|
||||||
|
|
||||||
|
public float Progress
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentProgress = value;
|
||||||
|
if (value < 0.5f)
|
||||||
|
{
|
||||||
|
progressBar.color2 = Color.Lerp(Color.black, Color.white, value * 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
progressBar.color2 = Color.white;
|
||||||
|
progressBar.color1 = Color.Lerp(Color.black, Color.white, (value - 0.5f) * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
progressBar.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float Opacity
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
var alpha = (byte)(value * 255);
|
||||||
|
progressBar.color1.a = alpha;
|
||||||
|
progressBar.color2.a = alpha;
|
||||||
|
describeText.color = value > 0.5f ? Color.Lerp(new Color(1, 1, 1, 0), textColor, (value - 0.5f) * 2) : new Color(1, 1, 1, 0);
|
||||||
|
progressBar.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
Base.Setting.Instance.Init();
|
||||||
|
#if !DEBUG
|
||||||
|
duration = Base.Setting.Instance.progressStepDuration;
|
||||||
|
fadeDuration = Base.Setting.Instance.exitAnimationDuration;
|
||||||
|
#endif
|
||||||
|
loadingUI.SetActive(true);
|
||||||
|
textColor = describeText.color;
|
||||||
|
StartCoroutine(LoadAllManagers());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator LoadAllManagers()
|
||||||
|
{
|
||||||
|
for (var i = 0; i < _loadingSteps.Length; i++)
|
||||||
|
{
|
||||||
|
// 更新描述文本
|
||||||
|
describeText.text = _loadingSteps[i];
|
||||||
|
|
||||||
|
// 获取当前阶段的目标进度
|
||||||
|
var targetProgress = (float)(i + 1) / _loadingSteps.Length;
|
||||||
|
|
||||||
|
// 平滑过渡到下一个阶段
|
||||||
|
yield return SmoothTransitionTo(targetProgress);
|
||||||
|
|
||||||
|
// 初始化对应的管理器
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
UnityLogger.Init();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Managers.DefineManager.Instance.Init();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Managers.PackagesImageManager.Instance.Init();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Managers.TileManager.Instance.Init();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Managers.AffiliationManager.Instance.Init();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Managers.ItemResourceManager.Instance.Init();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载完成后的处理
|
||||||
|
describeText.text = "加载完成!";
|
||||||
|
Progress = 1f;
|
||||||
|
|
||||||
|
// 开始渐隐效果
|
||||||
|
yield return FadeOutProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator SmoothTransitionTo(float targetProgress)
|
||||||
|
{
|
||||||
|
var startProgress = _currentProgress;
|
||||||
|
var elapsedTime = 0f;
|
||||||
|
|
||||||
|
while (elapsedTime < duration)
|
||||||
|
{
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
var t = Mathf.SmoothStep(0f, 1f, elapsedTime / duration); // 使用 SmoothStep 实现平滑过渡
|
||||||
|
Progress = Mathf.Lerp(startProgress, targetProgress, t);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保最终进度达到目标值
|
||||||
|
Progress = targetProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator FadeOutProgressBar()
|
||||||
|
{
|
||||||
|
var elapsedTime = 0f;
|
||||||
|
|
||||||
|
while (elapsedTime < fadeDuration)
|
||||||
|
{
|
||||||
|
elapsedTime += Time.deltaTime;
|
||||||
|
var t = Mathf.SmoothStep(0f, 1f, elapsedTime / fadeDuration); // 使用 SmoothStep 实现平滑渐隐
|
||||||
|
Opacity = 1f - t; // 不透明度从 1 到 0
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保最终不透明度为 0
|
||||||
|
Opacity = 0f;
|
||||||
|
loadingUI.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Base/Launcher.cs.meta
Normal file
3
Client/Assets/Scripts/Base/Launcher.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1966ff90f1854aee9ca89d700abef90d
|
||||||
|
timeCreated: 1755438497
|
90
Client/Assets/Scripts/Base/Setting.cs
Normal file
90
Client/Assets/Scripts/Base/Setting.cs
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Base
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class Setting : Utils.Singleton<Setting>
|
||||||
|
{
|
||||||
|
// 游戏设置数据类(用于序列化)
|
||||||
|
[System.Serializable]
|
||||||
|
public class GameSettings
|
||||||
|
{
|
||||||
|
public float progressStepDuration = 1f;
|
||||||
|
public float exitAnimationDuration = 2f;
|
||||||
|
public bool developerMode = false;
|
||||||
|
public bool friendlyFire = false;
|
||||||
|
public float globalVolume = 1.0f;
|
||||||
|
public WindowMode currentWindowMode = WindowMode.Fullscreen;
|
||||||
|
public Vector2Int windowResolution = new(1920, 1080);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当前游戏设置
|
||||||
|
public GameSettings CurrentSettings = new();
|
||||||
|
|
||||||
|
// 窗口模式枚举
|
||||||
|
public enum WindowMode { Fullscreen, Windowed, Borderless }
|
||||||
|
|
||||||
|
// 常用分辨率选项
|
||||||
|
public static readonly Vector2Int[] CommonResolutions = new Vector2Int[]
|
||||||
|
{
|
||||||
|
new(800, 600),
|
||||||
|
new(1024, 768),
|
||||||
|
new(1280, 720),
|
||||||
|
new(1366, 768),
|
||||||
|
new(1600, 900),
|
||||||
|
new(1920, 1080),
|
||||||
|
new(2560, 1440),
|
||||||
|
new(3840, 2160)
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始化加载设置
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
LoadSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SaveSettings()
|
||||||
|
{
|
||||||
|
string json = JsonConvert.SerializeObject(CurrentSettings);
|
||||||
|
PlayerPrefs.SetString("GameSettings", json);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
}
|
||||||
|
public void LoadSettings()
|
||||||
|
{
|
||||||
|
if (PlayerPrefs.HasKey("GameSettings"))
|
||||||
|
{
|
||||||
|
string json = PlayerPrefs.GetString("GameSettings");
|
||||||
|
CurrentSettings = JsonConvert.DeserializeObject<GameSettings>(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 应用加载的设置
|
||||||
|
ApplyAudioSettings();
|
||||||
|
ApplyWindowSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 应用音频设置
|
||||||
|
private void ApplyAudioSettings()
|
||||||
|
{
|
||||||
|
AudioListener.volume = Mathf.Clamp01(CurrentSettings.globalVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 应用窗口设置
|
||||||
|
private void ApplyWindowSettings()
|
||||||
|
{
|
||||||
|
switch (CurrentSettings.currentWindowMode)
|
||||||
|
{
|
||||||
|
case WindowMode.Fullscreen:
|
||||||
|
Screen.SetResolution(CurrentSettings.windowResolution.x, CurrentSettings.windowResolution.y, FullScreenMode.FullScreenWindow);
|
||||||
|
break;
|
||||||
|
case WindowMode.Windowed:
|
||||||
|
Screen.SetResolution(CurrentSettings.windowResolution.x, CurrentSettings.windowResolution.y, FullScreenMode.Windowed);
|
||||||
|
break;
|
||||||
|
case WindowMode.Borderless:
|
||||||
|
Screen.SetResolution(CurrentSettings.windowResolution.x, CurrentSettings.windowResolution.y, FullScreenMode.MaximizedWindow);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Base/Setting.cs.meta
Normal file
3
Client/Assets/Scripts/Base/Setting.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9eb8b1554550478c85cc87558920ec6b
|
||||||
|
timeCreated: 1755524879
|
@ -1,7 +1,19 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
|
public enum Relation
|
||||||
|
{
|
||||||
|
Neutral,
|
||||||
|
Hostile,
|
||||||
|
Friendly,
|
||||||
|
}
|
||||||
|
|
||||||
public class AffiliationDef : Define
|
public class AffiliationDef : Define
|
||||||
{
|
{
|
||||||
|
public Relation defaultRelation = Relation.Neutral;
|
||||||
|
public List<string> hostileFactions = new();
|
||||||
|
public List<string> neutralFactions = new();
|
||||||
|
public List<string> friendlyFactions = new();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,7 +7,7 @@ namespace Data
|
|||||||
public class BehaviorTreeDef : Define
|
public class BehaviorTreeDef : Define
|
||||||
{
|
{
|
||||||
public BehaviorTreeDef[] childTree;
|
public BehaviorTreeDef[] childTree;
|
||||||
public string className="Selector";
|
public string className= "ThinkNode_Selector";
|
||||||
public string value;
|
public string value;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
public class BuildingDef:PawnDef
|
public class BuildingDef : EntityDef
|
||||||
{
|
{
|
||||||
public bool IsBlocked = true;
|
public float slowDown = 0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
8
Client/Assets/Scripts/Data/BulletDef.cs
Normal file
8
Client/Assets/Scripts/Data/BulletDef.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
namespace Data
|
||||||
|
{
|
||||||
|
public class BulletDef:EntityDef
|
||||||
|
{
|
||||||
|
public string className;
|
||||||
|
public string value;
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Data/BulletDef.cs.meta
Normal file
3
Client/Assets/Scripts/Data/BulletDef.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3f32fe058231409aaef631564bc51317
|
||||||
|
timeCreated: 1755173999
|
@ -7,7 +7,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
public class CharacterDef : PawnDef
|
public class CharacterDef : EntityDef
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@ -279,10 +280,14 @@ namespace Data
|
|||||||
value = reference;
|
value = reference;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(field.FieldType.IsArray)
|
else if(field.FieldType.IsArray||typeof(IList).IsAssignableFrom(field.FieldType))
|
||||||
{
|
{
|
||||||
value = ProcessArrayField(field, element);
|
value = ProcessArrayField(field, element);
|
||||||
}
|
}
|
||||||
|
else if (field.FieldType.IsEnum)
|
||||||
|
{
|
||||||
|
value = Enum.Parse(field.FieldType, element.Value);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
value = Convert.ChangeType(element.Value, field.FieldType);
|
value = Convert.ChangeType(element.Value, field.FieldType);
|
||||||
@ -291,13 +296,14 @@ namespace Data
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"Error setting field {field.Name}: {ex.Message}");
|
Debug.LogWarning($"Error setting field ,field name:{field.Name}; value: {element.Value}; error: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static object ProcessArrayField(FieldInfo field, XElement element)
|
private static object ProcessArrayField(FieldInfo field, XElement element)
|
||||||
{
|
{
|
||||||
Type elementType = field.FieldType.GetElementType();
|
var elementType = field.FieldType.GetElementType();
|
||||||
if (elementType == null) return null;
|
if (elementType == null) return null;
|
||||||
|
|
||||||
var arrayElements = new List<object>();
|
var arrayElements = new List<object>();
|
||||||
@ -305,7 +311,7 @@ namespace Data
|
|||||||
{
|
{
|
||||||
if (elementType.IsSubclassOf(typeof(Define)))
|
if (elementType.IsSubclassOf(typeof(Define)))
|
||||||
{
|
{
|
||||||
Define nestedDefine = (Define)Activator.CreateInstance(elementType);
|
var nestedDefine = (Define)Activator.CreateInstance(elementType);
|
||||||
DefaultInitDefine(nestedDefine, liElement, elementType);
|
DefaultInitDefine(nestedDefine, liElement, elementType);
|
||||||
arrayElements.Add(nestedDefine);
|
arrayElements.Add(nestedDefine);
|
||||||
}
|
}
|
||||||
@ -326,8 +332,8 @@ namespace Data
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 构建结果数组
|
// 构建结果数组
|
||||||
Array resultArray = Array.CreateInstance(elementType, arrayElements.Count);
|
var resultArray = Array.CreateInstance(elementType, arrayElements.Count);
|
||||||
for (int i = 0; i < arrayElements.Count; i++)
|
for (var i = 0; i < arrayElements.Count; i++)
|
||||||
{
|
{
|
||||||
resultArray.SetValue(arrayElements[i], i);
|
resultArray.SetValue(arrayElements[i], i);
|
||||||
}
|
}
|
||||||
|
@ -26,37 +26,63 @@ namespace Data
|
|||||||
public DrawNodeDef drawingOrder_left;
|
public DrawNodeDef drawingOrder_left;
|
||||||
public DrawNodeDef drawingOrder_right;
|
public DrawNodeDef drawingOrder_right;
|
||||||
public string texturePath;
|
public string texturePath;
|
||||||
public int pixelsPerUnit = 16;
|
public float pixelsPerUnit = 16;
|
||||||
|
|
||||||
public DrawNodeDef GetDrawingOrder(Orientation orientation)
|
public DrawNodeDef GetDrawingOrder(Orientation orientation, out Orientation sourceOrientation)
|
||||||
{
|
{
|
||||||
// 定义一个临时变量用于存储结果
|
// 定义一个临时变量用于存储结果
|
||||||
DrawNodeDef result = null;
|
DrawNodeDef result = null;
|
||||||
|
|
||||||
|
// 初始化 sourceOrientation 为默认值
|
||||||
|
sourceOrientation = Orientation.Down;
|
||||||
|
|
||||||
// 根据传入的 Orientation 获取对应的 DrawingOrderDef
|
// 根据传入的 Orientation 获取对应的 DrawingOrderDef
|
||||||
switch (orientation)
|
switch (orientation)
|
||||||
{
|
{
|
||||||
case Orientation.Down:
|
case Orientation.Down:
|
||||||
result = drawingOrder_down;
|
result = drawingOrder_down;
|
||||||
|
sourceOrientation = Orientation.Down;
|
||||||
break;
|
break;
|
||||||
case Orientation.Up:
|
case Orientation.Up:
|
||||||
result = drawingOrder_up;
|
result = drawingOrder_up;
|
||||||
|
sourceOrientation = Orientation.Up;
|
||||||
break;
|
break;
|
||||||
case Orientation.Left:
|
case Orientation.Left:
|
||||||
result = drawingOrder_left;
|
result = drawingOrder_left;
|
||||||
|
sourceOrientation = Orientation.Left;
|
||||||
break;
|
break;
|
||||||
case Orientation.Right:
|
case Orientation.Right:
|
||||||
result = drawingOrder_right;
|
result = drawingOrder_right;
|
||||||
|
sourceOrientation = Orientation.Right;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("Invalid orientation value.");
|
throw new ArgumentException("Invalid orientation value.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果当前方向的结果为空,则尝试用 drawingOrder_down 填充
|
// 如果当前方向的结果为空,则尝试用 drawingOrder_down 填充
|
||||||
if (result == null) result = drawingOrder_down;
|
if (result == null)
|
||||||
|
{
|
||||||
|
result = drawingOrder_down;
|
||||||
|
sourceOrientation = Orientation.Down; // 更新 sourceOrientation
|
||||||
|
}
|
||||||
|
|
||||||
// 如果 drawingOrder_down 仍然为空,则尝试用其他非空方向填充
|
// 如果 drawingOrder_down 仍然为空,则尝试用其他非空方向填充
|
||||||
if (result == null) result = drawingOrder_up ?? drawingOrder_left ?? drawingOrder_right;
|
if (result != null) return result;
|
||||||
|
if (drawingOrder_up != null)
|
||||||
|
{
|
||||||
|
result = drawingOrder_up;
|
||||||
|
sourceOrientation = Orientation.Up; // 更新 sourceOrientation
|
||||||
|
}
|
||||||
|
else if (drawingOrder_left != null)
|
||||||
|
{
|
||||||
|
result = drawingOrder_left;
|
||||||
|
sourceOrientation = Orientation.Left; // 更新 sourceOrientation
|
||||||
|
}
|
||||||
|
else if (drawingOrder_right != null)
|
||||||
|
{
|
||||||
|
result = drawingOrder_right;
|
||||||
|
sourceOrientation = Orientation.Right; // 更新 sourceOrientation
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,13 @@ using System.Xml.Linq;
|
|||||||
|
|
||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
public class PawnDef : Define
|
public class EntityDef : Define
|
||||||
{
|
{
|
||||||
public AttributesDef attributes;
|
public AttributesDef attributes;
|
||||||
public DrawingOrderDef drawingOrder;
|
public DrawingOrderDef drawingOrder;
|
||||||
|
|
||||||
public BehaviorTreeDef behaviorTree;
|
public BehaviorTreeDef behaviorTree;
|
||||||
public string affiliation;
|
public AffiliationDef affiliation;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,13 +1,23 @@
|
|||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
|
public enum ItemRarity
|
||||||
|
{
|
||||||
|
Common,
|
||||||
|
Uncommon,
|
||||||
|
Rare,
|
||||||
|
Epic,
|
||||||
|
Legendary
|
||||||
|
}
|
||||||
public class ItemDef:Define
|
public class ItemDef:Define
|
||||||
{
|
{
|
||||||
public ImageDef texture;
|
public ImageDef texture;
|
||||||
public AttributesDef attributes;
|
public ItemRarity rarity = ItemRarity.Common;
|
||||||
|
public int maxStack = 1; // 最大堆叠数量,默认为1
|
||||||
|
public bool ssEquippable = false; // 是否可装备
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WeaponDef : ItemDef
|
public class WeaponDef : ItemDef
|
||||||
{
|
{
|
||||||
|
public AttributesDef attributes;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
using UnityEngine.Tilemaps;
|
||||||
|
|
||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
@ -7,6 +8,7 @@ namespace Data
|
|||||||
{
|
{
|
||||||
public ImageDef texture;
|
public ImageDef texture;
|
||||||
public string name = "";
|
public string name = "";
|
||||||
|
public Tile.ColliderType collider = Tile.ColliderType.None;
|
||||||
|
|
||||||
public override bool Init(XElement xmlDef)
|
public override bool Init(XElement xmlDef)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
namespace Data
|
namespace Data
|
||||||
{
|
{
|
||||||
public class MonsterDef:PawnDef
|
public class MonsterDef:EntityDef
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
40
Client/Assets/Scripts/Entity/Building.cs
Normal file
40
Client/Assets/Scripts/Entity/Building.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using Base;
|
||||||
|
using Data;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Entity
|
||||||
|
{
|
||||||
|
public class Building:Entity
|
||||||
|
{
|
||||||
|
public override void SetTarget(Vector3 pos)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void TryMove()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void UpdatePlayerControls()
|
||||||
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.W))
|
||||||
|
{
|
||||||
|
transform.position += Vector3.up;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.A))
|
||||||
|
{
|
||||||
|
transform.position += Vector3.left;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.S))
|
||||||
|
{
|
||||||
|
transform.position += Vector3.down;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.D))
|
||||||
|
{
|
||||||
|
transform.position += Vector3.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Entity/Building.cs.meta
Normal file
3
Client/Assets/Scripts/Entity/Building.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2ea66d65f9414d18988cbdc1a322e334
|
||||||
|
timeCreated: 1754650409
|
@ -1,10 +0,0 @@
|
|||||||
namespace Entity
|
|
||||||
{
|
|
||||||
public class BuildingBase:Entity
|
|
||||||
{
|
|
||||||
public override void TryMove()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: eb881a08fe004eb4ab0a6fa9d5d86d33
|
|
||||||
timeCreated: 1753100586
|
|
@ -1,12 +0,0 @@
|
|||||||
using Data;
|
|
||||||
|
|
||||||
namespace Entity
|
|
||||||
{
|
|
||||||
public class BuildingEntity:Entity
|
|
||||||
{
|
|
||||||
void Init(BuildingDef def)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 703125e2813a463d9b714841a3f9995f
|
|
||||||
timeCreated: 1753702932
|
|
20
Client/Assets/Scripts/Entity/BuildingOutline.cs
Normal file
20
Client/Assets/Scripts/Entity/BuildingOutline.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Entity
|
||||||
|
{
|
||||||
|
public class BuildingOutline:Outline
|
||||||
|
{
|
||||||
|
public BoxCollider2D boxCollider;
|
||||||
|
override public void Init()
|
||||||
|
{
|
||||||
|
var size = GetSize();
|
||||||
|
outlineRenderer.size = size;
|
||||||
|
boxCollider.size = size;
|
||||||
|
if (progressBarPrefab)
|
||||||
|
{
|
||||||
|
progressBarPrefab.transform.localPosition += new Vector3(0f, size.y * 2 / 3, 0f);
|
||||||
|
progressBarPrefab.transform.localScale = new Vector3(size.x, 1f / 10f, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
Client/Assets/Scripts/Entity/BuildingOutline.cs.meta
Normal file
2
Client/Assets/Scripts/Entity/BuildingOutline.cs.meta
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ba93dffd1aec4bd5b1ef57df2597ba56
|
66
Client/Assets/Scripts/Entity/Bullet.cs
Normal file
66
Client/Assets/Scripts/Entity/Bullet.cs
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
using System;
|
||||||
|
using Base;
|
||||||
|
using Data;
|
||||||
|
using Prefab;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Entity
|
||||||
|
{
|
||||||
|
public class Bullet : Entity
|
||||||
|
{
|
||||||
|
public Entity bulletSource;
|
||||||
|
public float lifeTime = 10;
|
||||||
|
|
||||||
|
public override void SetTarget(Vector3 pos)
|
||||||
|
{
|
||||||
|
base.SetTarget(pos);
|
||||||
|
RotateTransformToDirection(transform, direction);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void AutoBehave()
|
||||||
|
{
|
||||||
|
TryMove();
|
||||||
|
lifeTime-=Time.deltaTime;
|
||||||
|
if (lifeTime <= 0)
|
||||||
|
{
|
||||||
|
Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnTriggerEnter2D(Collider2D other)
|
||||||
|
{
|
||||||
|
var entity = other.GetComponent<Entity>();
|
||||||
|
if (!entity || entity == bulletSource) return;
|
||||||
|
if (Managers.AffiliationManager.Instance.GetRelation(bulletSource.affiliation, entity.affiliation) != Relation.Friendly)
|
||||||
|
{
|
||||||
|
entity.OnHit(this);
|
||||||
|
}
|
||||||
|
else if (Setting.Instance.CurrentSettings.friendlyFire)
|
||||||
|
{
|
||||||
|
entity.OnHit(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return; // 如果是友好关系且不允许友军伤害,则不处理
|
||||||
|
}
|
||||||
|
attributes.health -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 旋转对象到指定方向
|
||||||
|
public static void RotateTransformToDirection(Transform transform, Vector3 targetDirection)
|
||||||
|
{
|
||||||
|
// 确保目标方向不是零向量
|
||||||
|
if (targetDirection == Vector3.zero)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// 计算当前向上方向与目标方向之间的角度
|
||||||
|
float angle = Mathf.Atan2(targetDirection.y, targetDirection.x) * Mathf.Rad2Deg;
|
||||||
|
|
||||||
|
// 调整角度,因为默认贴图向上是0度,而Atan2计算的是相对于x轴的角度
|
||||||
|
angle -= 90f;
|
||||||
|
|
||||||
|
// 应用旋转
|
||||||
|
transform.rotation = Quaternion.Euler(0f, 0f, angle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Entity/Bullet.cs.meta
Normal file
3
Client/Assets/Scripts/Entity/Bullet.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3ccb9e42ac9e4492bff031709d2d2e92
|
||||||
|
timeCreated: 1755146614
|
@ -13,7 +13,7 @@ namespace Entity
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
aiTree = new RandomWander();
|
aiTree = new JobGiver_RandomWander();
|
||||||
attributes = new AttributesDef();
|
attributes = new AttributesDef();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,5 +23,16 @@ namespace Entity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void TryAttack()
|
||||||
|
{
|
||||||
|
if (IsAttacking)
|
||||||
|
return;
|
||||||
|
if (!Managers.DefineManager.Instance.defines.TryGetValue(nameof(BulletDef), out var def))
|
||||||
|
return;
|
||||||
|
var buttonDef = def.Values.First();
|
||||||
|
Vector3 dir = Utils.MousePosition.GetWorldPosition();
|
||||||
|
Managers.EntityManage.Instance.GenerateBulletEntity((BulletDef)buttonDef, Position,
|
||||||
|
dir - Position, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using AI;
|
using AI;
|
||||||
using Base;
|
using Base;
|
||||||
@ -7,23 +8,73 @@ using Prefab;
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Serialization;
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
|
|
||||||
namespace Entity
|
namespace Entity
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表示游戏中的实体类,继承自 MonoBehaviour 并实现 ITick 接口。
|
||||||
|
/// </summary>
|
||||||
public class Entity : MonoBehaviour, ITick
|
public class Entity : MonoBehaviour, ITick
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 动画预制体,用于管理实体的动画逻辑。
|
||||||
|
/// </summary>
|
||||||
public SpriteAnimator animatorPrefab;
|
public SpriteAnimator animatorPrefab;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 图像预制体,用于管理实体的静态图像显示。
|
||||||
|
/// </summary>
|
||||||
public ImagePrefab imagePrefab;
|
public ImagePrefab imagePrefab;
|
||||||
|
|
||||||
|
public ProgressBarPrefab healthBarPrefab;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 人工智能行为树,定义实体的行为逻辑。
|
||||||
|
/// </summary>
|
||||||
public AIBase aiTree;
|
public AIBase aiTree;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前实体正在执行的任务。
|
||||||
|
/// </summary>
|
||||||
public JobBase currentJob;
|
public JobBase currentJob;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实体的属性定义,包括生命值、攻击力、防御力等。
|
||||||
|
/// </summary>
|
||||||
public AttributesDef attributes = new();
|
public AttributesDef attributes = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实体当前的移动方向。
|
||||||
|
/// </summary>
|
||||||
public Vector3 direction;
|
public Vector3 direction;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实体的身体部分,用于挂载动画和图像节点。
|
||||||
|
/// </summary>
|
||||||
public GameObject body;
|
public GameObject body;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实体所属的阵营或派系。
|
||||||
|
/// </summary>
|
||||||
public string affiliation;
|
public string affiliation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表示实体是否可以被选择。
|
||||||
|
/// </summary>
|
||||||
public bool canSelect = true;
|
public bool canSelect = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表示实体是否处于追逐状态(影响移动速度)。
|
||||||
|
/// </summary>
|
||||||
public bool IsChase { set; get; } = true;
|
public bool IsChase { set; get; } = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表示实体是否由玩家控制。
|
||||||
|
/// </summary>
|
||||||
public bool PlayerControlled
|
public bool PlayerControlled
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
@ -37,26 +88,78 @@ namespace Entity
|
|||||||
}
|
}
|
||||||
get => _isPlayerControlled;
|
get => _isPlayerControlled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取实体当前位置。
|
||||||
|
/// </summary>
|
||||||
public Vector3 Position => transform.position;
|
public Vector3 Position => transform.position;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 表示实体是否已经死亡(生命值小于等于零)。
|
||||||
|
/// </summary>
|
||||||
public bool IsDead => attributes.health <= 0;
|
public bool IsDead => attributes.health <= 0;
|
||||||
|
public bool IsShowingOfHitBarUI=>hitBarUIShowTimer > 0;
|
||||||
|
public bool IsAttacking => attackCoroutine != null;
|
||||||
|
|
||||||
|
|
||||||
private bool _isPlayerControlled = false;
|
private bool _isPlayerControlled = false;
|
||||||
private bool _warning = false;
|
private bool _warning = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储不同朝向下的动画节点集合。
|
||||||
|
/// </summary>
|
||||||
public Dictionary<Orientation, List<ITick>> bodyAnimationNode = new();
|
public Dictionary<Orientation, List<ITick>> bodyAnimationNode = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储不同朝向下的身体节点对象。
|
||||||
|
/// </summary>
|
||||||
private Dictionary<Orientation, GameObject> bodyNodes = new();
|
private Dictionary<Orientation, GameObject> bodyNodes = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前实体的朝向。
|
||||||
|
/// </summary>
|
||||||
private Orientation currentOrientation = Orientation.Down;
|
private Orientation currentOrientation = Orientation.Down;
|
||||||
|
|
||||||
public virtual void Init(PawnDef pawnDef)
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击动画的持续时间(秒)。
|
||||||
|
/// </summary>
|
||||||
|
private const float attackAnimationDuration = 0.1f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 抖动的偏移量。
|
||||||
|
/// </summary>
|
||||||
|
private const float shakeOffset = 0.5f;
|
||||||
|
// 协程引用
|
||||||
|
private Coroutine attackCoroutine;
|
||||||
|
|
||||||
|
protected EntityDef entityDef;
|
||||||
|
|
||||||
|
|
||||||
|
public float hitBarUIShowTime = 5;
|
||||||
|
private float hitBarUIShowTimer = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化实体的基本属性和行为树。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entityDef">实体的定义数据。</param>
|
||||||
|
public virtual void Init(EntityDef entityDef)
|
||||||
{
|
{
|
||||||
attributes = pawnDef.attributes.Clone();
|
attributes = entityDef.attributes.Clone();
|
||||||
aiTree = ConvertToAIBase(pawnDef.behaviorTree);
|
aiTree = Utils.BehaviorTree.ConvertToAIBase(entityDef.behaviorTree);
|
||||||
affiliation = pawnDef.affiliation;
|
affiliation = entityDef.affiliation?.defName;
|
||||||
InitBody(pawnDef.drawingOrder);
|
InitBody(entityDef.drawingOrder);
|
||||||
|
this.entityDef = entityDef;
|
||||||
|
|
||||||
|
HideHealthBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化实体的身体部分,包括不同朝向下的绘图节点。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="drawingOrder">绘制顺序定义。</param>
|
||||||
public virtual void InitBody(DrawingOrderDef drawingOrder)
|
public virtual void InitBody(DrawingOrderDef drawingOrder)
|
||||||
{
|
{
|
||||||
// 定义方向枚举和对应的 GetDrawingOrder 调用
|
// 定义方向枚举和对应的 GetDrawingOrder 调用
|
||||||
@ -67,12 +170,12 @@ namespace Entity
|
|||||||
currentOrientation = orientation;
|
currentOrientation = orientation;
|
||||||
bodyAnimationNode[orientation] = new();
|
bodyAnimationNode[orientation] = new();
|
||||||
// 获取当前方向的绘图节点
|
// 获取当前方向的绘图节点
|
||||||
var drawNode = drawingOrder.GetDrawingOrder(orientation);
|
var drawNode = drawingOrder.GetDrawingOrder(orientation, out var realOrientation);
|
||||||
|
|
||||||
if (drawNode == null) continue;
|
if (drawNode == null) continue;
|
||||||
var directionRoot = new GameObject(orientation.ToString());
|
var directionRoot = new GameObject(orientation.ToString());
|
||||||
directionRoot.transform.SetParent(body.transform, false);
|
directionRoot.transform.SetParent(body.transform, false);
|
||||||
InitBodyPart(drawNode, directionRoot, drawingOrder.texturePath);
|
InitBodyPart(drawNode, directionRoot, drawingOrder.texturePath,realOrientation);
|
||||||
bodyNodes[orientation] = directionRoot;
|
bodyNodes[orientation] = directionRoot;
|
||||||
}
|
}
|
||||||
currentOrientation = Orientation.Down;
|
currentOrientation = Orientation.Down;
|
||||||
@ -84,8 +187,13 @@ namespace Entity
|
|||||||
SetOrientation(Orientation.Down);
|
SetOrientation(Orientation.Down);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 递归初始化单个绘图节点及其子节点
|
/// <summary>
|
||||||
public virtual void InitBodyPart(DrawNodeDef drawNode, GameObject parent, string folderPath)
|
/// 递归初始化单个绘图节点及其子节点。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="drawNode">绘图节点定义。</param>
|
||||||
|
/// <param name="parent">父节点对象。</param>
|
||||||
|
/// <param name="folderPath">纹理资源路径。</param>
|
||||||
|
public virtual void InitBodyPart(DrawNodeDef drawNode, GameObject parent, string folderPath,Orientation realOrientation)
|
||||||
{
|
{
|
||||||
if (drawNode == null) return;
|
if (drawNode == null) return;
|
||||||
|
|
||||||
@ -103,12 +211,11 @@ namespace Entity
|
|||||||
nodeObject = Instantiate(imagePrefab.gameObject, parent.transform);
|
nodeObject = Instantiate(imagePrefab.gameObject, parent.transform);
|
||||||
var texture =
|
var texture =
|
||||||
Managers.PackagesImageManager.Instance.FindBodyTextures(drawNode.packID, folderPath,
|
Managers.PackagesImageManager.Instance.FindBodyTextures(drawNode.packID, folderPath,
|
||||||
$"{drawNode.nodeName}_{currentOrientation}");
|
$"{drawNode.nodeName}_{realOrientation}");
|
||||||
if (texture.Length > 0)
|
var image = nodeObject.GetComponent<ImagePrefab>();
|
||||||
{
|
image.SetSprite(texture.Length > 0
|
||||||
var image = nodeObject.GetComponent<ImagePrefab>();
|
? texture[0]
|
||||||
image.SetSprite(texture[0]);
|
: Managers.PackagesImageManager.Instance.defaultSprite);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawNodeType.Animation:
|
case DrawNodeType.Animation:
|
||||||
@ -118,7 +225,7 @@ namespace Entity
|
|||||||
bodyAnimationNode[currentOrientation].Add(tick);
|
bodyAnimationNode[currentOrientation].Add(tick);
|
||||||
var textures = Managers.PackagesImageManager.Instance.FindBodyTextures(drawNode.packID,
|
var textures = Managers.PackagesImageManager.Instance.FindBodyTextures(drawNode.packID,
|
||||||
folderPath,
|
folderPath,
|
||||||
$"{drawNode.nodeName}_{currentOrientation}");
|
$"{drawNode.nodeName}_{realOrientation}");
|
||||||
var animator = nodeObject.GetComponent<SpriteAnimator>();
|
var animator = nodeObject.GetComponent<SpriteAnimator>();
|
||||||
animator.SetSprites(textures);
|
animator.SetSprites(textures);
|
||||||
break;
|
break;
|
||||||
@ -131,9 +238,13 @@ namespace Entity
|
|||||||
// 递归初始化子节点
|
// 递归初始化子节点
|
||||||
foreach (var child in drawNode.children)
|
foreach (var child in drawNode.children)
|
||||||
{
|
{
|
||||||
InitBodyPart(child, nodeObject, folderPath);
|
InitBodyPart(child, nodeObject, folderPath,realOrientation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新实体的逻辑,包括玩家控制和自动行为。
|
||||||
|
/// </summary>
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
if (_isPlayerControlled)
|
if (_isPlayerControlled)
|
||||||
@ -151,48 +262,120 @@ namespace Entity
|
|||||||
tick.Tick();
|
tick.Tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsShowingOfHitBarUI)
|
||||||
|
{
|
||||||
|
hitBarUIShowTimer -= Time.deltaTime;
|
||||||
|
if (hitBarUIShowTimer <= 0)
|
||||||
|
{
|
||||||
|
HideHealthBar();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 尝试攻击目标实体。
|
||||||
|
/// </summary>
|
||||||
public virtual void TryAttack()
|
public virtual void TryAttack()
|
||||||
{
|
{
|
||||||
|
if(!IsAttacking)
|
||||||
|
attackCoroutine = StartCoroutine(AttackFlow());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置实体的朝向。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orientation">新的朝向。</param>
|
||||||
public virtual void SetOrientation(Orientation orientation)
|
public virtual void SetOrientation(Orientation orientation)
|
||||||
{
|
{
|
||||||
bodyNodes[currentOrientation]?.SetActive(false);
|
// 禁用当前朝向的节点
|
||||||
|
if (bodyNodes.TryGetValue(currentOrientation, out var currentNode))
|
||||||
|
{
|
||||||
|
currentNode.SetActive(false);
|
||||||
|
}
|
||||||
|
// 设置新的朝向
|
||||||
currentOrientation = orientation;
|
currentOrientation = orientation;
|
||||||
bodyNodes[orientation]?.SetActive(true);
|
// 激活新朝向的节点
|
||||||
|
if (bodyNodes.TryGetValue(orientation, out var newNode))
|
||||||
|
{
|
||||||
|
newNode.SetActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 往对应朝向移动moveSpeed*deltaTime的距离
|
/// 根据方向尝试移动实体。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void TryMove()
|
public virtual void TryMove()
|
||||||
{
|
{
|
||||||
|
if (IsAttacking)
|
||||||
|
return;
|
||||||
transform.position += direction * (attributes.moveSpeed * Time.deltaTime * (IsChase ? 1 : 0.5f));
|
transform.position += direction * (attributes.moveSpeed * Time.deltaTime * (IsChase ? 1 : 0.5f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理实体受到攻击的逻辑。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="from">攻击来源实体。</param>
|
||||||
public virtual void OnHit(Entity from)
|
public virtual void OnHit(Entity from)
|
||||||
{
|
{
|
||||||
var hit = from.attributes.attack - attributes.defense;
|
var hit = from.attributes.attack - attributes.defense;
|
||||||
if (hit < 0)
|
if (hit < 0)
|
||||||
hit = from.attributes.attack / 100;
|
hit = from.attributes.attack / 100;
|
||||||
attributes.health -= hit;
|
attributes.health -= hit;
|
||||||
|
currentJob?.StopJob();
|
||||||
currentJob.StopJob();
|
ShowHealthBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetTarget(Vector3 pos)
|
public void ShowHealthBar()
|
||||||
{
|
{
|
||||||
direction = (pos - transform.position).normalized;
|
if(!healthBarPrefab)
|
||||||
|
return;
|
||||||
|
healthBarPrefab.gameObject.SetActive(true);
|
||||||
|
healthBarPrefab.Progress = (float)attributes.health / entityDef.attributes.health;
|
||||||
|
hitBarUIShowTimer=hitBarUIShowTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HideHealthBar()
|
||||||
|
{
|
||||||
|
if(!healthBarPrefab)
|
||||||
|
return;
|
||||||
|
healthBarPrefab.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 杀死实体,设置生命值为零。
|
||||||
|
/// </summary>
|
||||||
public virtual void Kill()
|
public virtual void Kill()
|
||||||
{
|
{
|
||||||
attributes.health = 0;
|
attributes.health = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AutoBehave()
|
/// <summary>
|
||||||
|
/// 设置实体的目标位置。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pos">目标位置。</param>
|
||||||
|
public virtual void SetTarget(Vector3 pos)
|
||||||
|
{
|
||||||
|
direction = (pos - transform.position).normalized;
|
||||||
|
Orientation ori;
|
||||||
|
// 判断方向向量最接近哪个朝向
|
||||||
|
if (Mathf.Abs(direction.y) > Mathf.Abs(direction.x))
|
||||||
|
{
|
||||||
|
// 垂直方向优先
|
||||||
|
ori = direction.y > 0 ? Orientation.Up : Orientation.Down;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 水平方向优先
|
||||||
|
ori = direction.x > 0 ? Orientation.Right : Orientation.Left;
|
||||||
|
}
|
||||||
|
SetOrientation(ori);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自动行为逻辑,根据行为树执行任务。
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void AutoBehave()
|
||||||
{
|
{
|
||||||
if (aiTree == null)
|
if (aiTree == null)
|
||||||
return;
|
return;
|
||||||
@ -214,12 +397,16 @@ namespace Entity
|
|||||||
currentJob.Update();
|
currentJob.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePlayerControls()
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新玩家控制的逻辑,处理输入和移动。
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void UpdatePlayerControls()
|
||||||
{
|
{
|
||||||
// 检测 Shift 键状态
|
// 检测 Shift 键状态
|
||||||
var isHoldingShift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
|
var isHoldingShift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
|
||||||
IsChase = !isHoldingShift; // 按住 Shift 时 IsChase = false,否则 true
|
IsChase = !isHoldingShift; // 按住 Shift 时 IsChase = false,否则 true
|
||||||
// 获取当前键盘输入状态(2D 移动,只使用 X 和 Y 轴)
|
// 获取当前键盘输入状态(2D 移动,只使用 X 和 Y 轴)
|
||||||
var inputDirection = Vector2.zero;
|
var inputDirection = Vector2.zero;
|
||||||
|
|
||||||
// 检测 WASD 或方向键输入
|
// 检测 WASD 或方向键输入
|
||||||
@ -239,7 +426,10 @@ namespace Entity
|
|||||||
{
|
{
|
||||||
inputDirection += Vector2.right; // 向右移动(X 轴正方向)
|
inputDirection += Vector2.right; // 向右移动(X 轴正方向)
|
||||||
}
|
}
|
||||||
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
{
|
||||||
|
TryAttack();
|
||||||
|
}
|
||||||
// 如果有输入方向,则设置目标位置并尝试移动
|
// 如果有输入方向,则设置目标位置并尝试移动
|
||||||
if (inputDirection == Vector2.zero) return;
|
if (inputDirection == Vector2.zero) return;
|
||||||
// 归一化方向向量,确保对角线移动速度一致
|
// 归一化方向向量,确保对角线移动速度一致
|
||||||
@ -253,61 +443,69 @@ namespace Entity
|
|||||||
|
|
||||||
// 调用 TryMove 方法处理实际移动逻辑
|
// 调用 TryMove 方法处理实际移动逻辑
|
||||||
TryMove();
|
TryMove();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public static AIBase ConvertToAIBase(BehaviorTreeDef behaviorTreeDef)
|
// 攻击流程协程
|
||||||
|
IEnumerator AttackFlow()
|
||||||
{
|
{
|
||||||
if (behaviorTreeDef == null)
|
// 播放攻击动画并获取动画持续时间
|
||||||
return null;
|
var animationDuration = PlayAttackAnimation();
|
||||||
var aiBase = CreateAIBaseInstance(behaviorTreeDef.className);
|
// 等待动画执行完毕
|
||||||
if (behaviorTreeDef.childTree != null)
|
yield return new WaitForSeconds(animationDuration);
|
||||||
{
|
// 调用检测并攻击敌人的方法
|
||||||
foreach (var child in behaviorTreeDef.childTree)
|
DetectAndAttackEnemies();
|
||||||
{
|
// 攻击流程结束,清理协程引用
|
||||||
if (child != null)
|
attackCoroutine = null;
|
||||||
{
|
|
||||||
aiBase.children.Add(ConvertToAIBase(child));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return aiBase;
|
|
||||||
}
|
}
|
||||||
// 使用反射根据 className 创建具体的 AIBase 子类实例
|
|
||||||
private static AIBase CreateAIBaseInstance(string className)
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 播放攻击动画。
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>开始检测攻击范围内敌人的时间。</returns>
|
||||||
|
public float PlayAttackAnimation()
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(className))
|
// 启动协程来执行攻击动画
|
||||||
throw new ArgumentException("className 不能为空");
|
StartCoroutine(ShakeInDirectionCoroutine());
|
||||||
if (className.Equals("AIBase", StringComparison.OrdinalIgnoreCase))
|
|
||||||
|
// 返回检测敌人的起始时间
|
||||||
|
return attackAnimationDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator ShakeInDirectionCoroutine()
|
||||||
|
{
|
||||||
|
var originalPosition = transform.position; // 记录原始位置
|
||||||
|
transform.position += direction * shakeOffset;
|
||||||
|
yield return new WaitForSeconds(attackAnimationDuration);
|
||||||
|
transform.position = originalPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DetectAndAttackEnemies()
|
||||||
|
{
|
||||||
|
var attackCount = attributes.attackTargetCount;
|
||||||
|
// 获取攻击范围内的所有碰撞体
|
||||||
|
var hits = Physics2D.OverlapCircleAll(
|
||||||
|
transform.position,
|
||||||
|
attributes.attackRange,
|
||||||
|
LayerMask.GetMask("Entity"));
|
||||||
|
|
||||||
|
foreach (var hit in hits)
|
||||||
{
|
{
|
||||||
return (AIBase)Activator.CreateInstance(typeof(AIBase));
|
if (attackCount <= 0) break;
|
||||||
|
|
||||||
|
// 检查是否是自身(额外安全措施)
|
||||||
|
if (hit.gameObject == this.gameObject) continue;
|
||||||
|
|
||||||
|
// 获取Entity组件
|
||||||
|
var entity = hit.GetComponent<Entity>();
|
||||||
|
if (!entity) continue;
|
||||||
|
|
||||||
|
// 执行攻击
|
||||||
|
entity.OnHit(this);
|
||||||
|
attackCount--;
|
||||||
}
|
}
|
||||||
// 定义可能的命名空间列表
|
|
||||||
var possibleNamespaces = new[] { "AI" };
|
|
||||||
|
|
||||||
foreach (var ns in possibleNamespaces)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 获取当前程序集
|
|
||||||
var assembly = typeof(AIBase).Assembly;
|
|
||||||
|
|
||||||
// 尝试查找类型
|
|
||||||
var type = assembly.GetType($"{ns}.{className}");
|
|
||||||
|
|
||||||
if (type != null && typeof(AIBase).IsAssignableFrom(type))
|
|
||||||
{
|
|
||||||
// 如果找到合适的类型,则创建实例并返回
|
|
||||||
return (AIBase)Activator.CreateInstance(type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 忽略单个命名空间的错误,继续尝试下一个命名空间
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 如果所有命名空间都未找到对应的类型,抛出异常
|
|
||||||
throw new InvalidOperationException($"无法找到类型 {className} 或该类型不是 AIBase 的子类");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
70
Client/Assets/Scripts/Entity/Inventory.cs
Normal file
70
Client/Assets/Scripts/Entity/Inventory.cs
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Item;
|
||||||
|
|
||||||
|
namespace Entity
|
||||||
|
{
|
||||||
|
public class Inventory
|
||||||
|
{
|
||||||
|
public Entity from; // 物品所属实体
|
||||||
|
public List<ItemBase> items = new List<ItemBase>(); // 背包中的物品列表
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加物品到背包
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">要添加的物品</param>
|
||||||
|
/// <param name="count">添加的数量</param>
|
||||||
|
public void AddItem(ItemResource resource, int count)
|
||||||
|
{
|
||||||
|
if (count <= 0) return; // 如果数量小于等于0,直接返回
|
||||||
|
|
||||||
|
// 检查背包中是否已存在相同物品
|
||||||
|
foreach (var item in items)
|
||||||
|
{
|
||||||
|
if (item.resource.Equals(resource))
|
||||||
|
{
|
||||||
|
item.count += count; // 增加数量
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果没有找到相同物品,则创建新物品并添加到背包
|
||||||
|
var newItem = new ItemBase { resource = resource, count = count };
|
||||||
|
items.Add(newItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从背包中取出物品
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="itemName">物品名称</param>
|
||||||
|
/// <param name="count">取出的数量</param>
|
||||||
|
/// <returns>是否成功取出</returns>
|
||||||
|
public bool RemoveItem(string itemName, int count)
|
||||||
|
{
|
||||||
|
if (count <= 0) return false; // 如果数量小于等于0,直接返回失败
|
||||||
|
|
||||||
|
foreach (var item in items)
|
||||||
|
{
|
||||||
|
if (item.resource.name == itemName)
|
||||||
|
{
|
||||||
|
if (item.count >= count)
|
||||||
|
{
|
||||||
|
item.count -= count; // 减少数量
|
||||||
|
if (item.count == 0)
|
||||||
|
{
|
||||||
|
items.Remove(item); // 如果数量为0,则移除该物品
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // 成功取出
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false; // 数量不足
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false; // 未找到物品
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Entity/Inventory.cs.meta
Normal file
3
Client/Assets/Scripts/Entity/Inventory.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3da96d312e8e4c65b9157548281f7826
|
||||||
|
timeCreated: 1755061766
|
@ -1,12 +1,9 @@
|
|||||||
namespace Entity
|
namespace Entity
|
||||||
{
|
{
|
||||||
public class Monster
|
public class Monster:Entity
|
||||||
{
|
{
|
||||||
public Protocol.MonsterPack ToPack()
|
|
||||||
{
|
|
||||||
var pack= new Protocol.MonsterPack();
|
|
||||||
return pack;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Managers;
|
||||||
|
using Prefab;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
using UnityEngine.Events;
|
||||||
|
|
||||||
@ -7,9 +8,12 @@ namespace Entity
|
|||||||
{
|
{
|
||||||
public class Outline : MonoBehaviour
|
public class Outline : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public RightMenuPrefab rightMenuPrefab;
|
||||||
|
|
||||||
public GameObject body;
|
public GameObject body;
|
||||||
public SpriteRenderer outlineRenderer;
|
public SpriteRenderer outlineRenderer;
|
||||||
public CapsuleCollider2D outlineCollider;
|
public CapsuleCollider2D outlineCollider;
|
||||||
|
public ProgressBarPrefab progressBarPrefab;
|
||||||
|
|
||||||
public Entity entity;
|
public Entity entity;
|
||||||
|
|
||||||
@ -17,12 +21,17 @@ namespace Entity
|
|||||||
|
|
||||||
public static Vector3 minimum=new(0.5f,0.5f,0.5f);
|
public static Vector3 minimum=new(0.5f,0.5f,0.5f);
|
||||||
|
|
||||||
public void Init()
|
public virtual void Init()
|
||||||
{
|
{
|
||||||
var size = GetSize();
|
var size = GetSize();
|
||||||
outlineRenderer.size = size;
|
outlineRenderer.size = size;
|
||||||
outlineCollider.direction = size.x > size.y ? CapsuleDirection2D.Horizontal : CapsuleDirection2D.Vertical;
|
outlineCollider.direction = size.x > size.y ? CapsuleDirection2D.Horizontal : CapsuleDirection2D.Vertical;
|
||||||
outlineCollider.size = size;
|
outlineCollider.size = size;
|
||||||
|
if (progressBarPrefab)
|
||||||
|
{
|
||||||
|
progressBarPrefab.transform.localPosition += new Vector3(0f, size.y * 2 / 3, 0f);
|
||||||
|
progressBarPrefab.transform.localScale = new Vector3(size.x, 1f / 10f, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Show()
|
public void Show()
|
||||||
@ -76,24 +85,21 @@ namespace Entity
|
|||||||
private void OnMouseEnter()
|
private void OnMouseEnter()
|
||||||
{
|
{
|
||||||
Show();
|
Show();
|
||||||
_select = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseExit()
|
private void OnMouseExit()
|
||||||
{
|
{
|
||||||
Hide();
|
Hide();
|
||||||
_select = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnMouseOver()
|
private void OnMouseOver()
|
||||||
{
|
{
|
||||||
|
if (!entity.canSelect)
|
||||||
|
return;
|
||||||
// 检测是否按下的是鼠标右键
|
// 检测是否按下的是鼠标右键
|
||||||
if (Input.GetMouseButtonDown(1)) // 鼠标右键对应的是按钮索引 1
|
if (Input.GetMouseButtonDown(1)) // 鼠标右键对应的是按钮索引 1
|
||||||
{
|
{
|
||||||
var rightMenu = Prefab.RightMenuPrefab.Instance;
|
RightMenuManager.GenerateRightMenu(GetMenu(), Input.mousePosition);
|
||||||
rightMenu.Init(GetMenu());
|
|
||||||
rightMenu.transform.position = Input.mousePosition;
|
|
||||||
rightMenu.Show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +110,14 @@ namespace Entity
|
|||||||
result.Add(("结束操控", EndControl));
|
result.Add(("结束操控", EndControl));
|
||||||
else
|
else
|
||||||
result.Add(("手动操控", StartControl));
|
result.Add(("手动操控", StartControl));
|
||||||
|
if (CameraControl.CameraControl.Instance.focusedEntity == entity)
|
||||||
|
{
|
||||||
|
result.Add(("取消跟随", ()=>CameraControl.CameraControl.Instance.focusedEntity=null));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.Add(("视角跟随", ()=>CameraControl.CameraControl.Instance.focusedEntity=entity));
|
||||||
|
}
|
||||||
result.Add(("杀死", () => entity.Kill()));
|
result.Add(("杀死", () => entity.Kill()));
|
||||||
result.Add(("变成笨蛋", BecomeDefault));
|
result.Add(("变成笨蛋", BecomeDefault));
|
||||||
return result;
|
return result;
|
||||||
|
3
Client/Assets/Scripts/Item.meta
Normal file
3
Client/Assets/Scripts/Item.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 89870f1a36ce43558b90c49513f55f10
|
||||||
|
timeCreated: 1755061695
|
12
Client/Assets/Scripts/Item/ItemBase.cs
Normal file
12
Client/Assets/Scripts/Item/ItemBase.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Item
|
||||||
|
{
|
||||||
|
public class ItemBase
|
||||||
|
{
|
||||||
|
public ItemResource resource;
|
||||||
|
|
||||||
|
public int count=0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Item/ItemBase.cs.meta
Normal file
3
Client/Assets/Scripts/Item/ItemBase.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 01a2843d5856483fa5b6967e2e01db62
|
||||||
|
timeCreated: 1755061705
|
12
Client/Assets/Scripts/Item/ItemResource.cs
Normal file
12
Client/Assets/Scripts/Item/ItemResource.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Item
|
||||||
|
{
|
||||||
|
public class ItemResource
|
||||||
|
{
|
||||||
|
public string name;
|
||||||
|
public string description;
|
||||||
|
|
||||||
|
public Sprite icon;
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Item/ItemResource.cs.meta
Normal file
3
Client/Assets/Scripts/Item/ItemResource.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e85c1b3671d1471e85a7ec96eadfabe2
|
||||||
|
timeCreated: 1755061828
|
164
Client/Assets/Scripts/Managers/AffiliationManager.cs
Normal file
164
Client/Assets/Scripts/Managers/AffiliationManager.cs
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Data;
|
||||||
|
|
||||||
|
namespace Managers
|
||||||
|
{
|
||||||
|
public class AffiliationManager:Utils.Singleton<AffiliationManager>
|
||||||
|
{
|
||||||
|
//定义名,阵营定义
|
||||||
|
private readonly Dictionary<string, AffiliationDef> _affiliations = new();
|
||||||
|
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
var affiliationList = Managers.DefineManager.Instance.QueryDefinesByType<AffiliationDef>();
|
||||||
|
if (affiliationList == null ||affiliationList.Length==0)
|
||||||
|
return;
|
||||||
|
foreach (var affiliation in affiliationList)
|
||||||
|
{
|
||||||
|
_affiliations.Add(affiliation.defName, affiliation);
|
||||||
|
}
|
||||||
|
ValidateAndFixRelationships();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetAffiliationName(string defName)
|
||||||
|
{
|
||||||
|
return _affiliations[defName].defName;
|
||||||
|
}
|
||||||
|
public Relation GetRelation(AffiliationDef affiliation1, AffiliationDef affiliation2)
|
||||||
|
{
|
||||||
|
if (affiliation1 == null || affiliation2 == null)
|
||||||
|
{
|
||||||
|
return Relation.Neutral; // 如果任一阵营不存在,返回中立关系
|
||||||
|
}
|
||||||
|
return GetRelation(affiliation1.defName, affiliation2.defName);
|
||||||
|
}
|
||||||
|
public Relation GetRelation(string factionName1, string factionName2)
|
||||||
|
{
|
||||||
|
// 如果查询的是同一个派系,默认是友好关系
|
||||||
|
if (factionName1 == factionName2)
|
||||||
|
{
|
||||||
|
return Relation.Friendly;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 尝试获取两个派系的定义
|
||||||
|
if (!_affiliations.TryGetValue(factionName1, out var faction1) ||
|
||||||
|
!_affiliations.TryGetValue(factionName2, out _))
|
||||||
|
{
|
||||||
|
if (faction1 != null) return faction1.defaultRelation;
|
||||||
|
return Relation.Neutral;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查faction1是否明确将faction2列为敌对
|
||||||
|
if (faction1.hostileFactions != null && faction1.hostileFactions.Contains(factionName2))
|
||||||
|
{
|
||||||
|
return Relation.Hostile;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查faction1是否明确将faction2列为友好
|
||||||
|
if (faction1.friendlyFactions != null && faction1.friendlyFactions.Contains(factionName2))
|
||||||
|
{
|
||||||
|
return Relation.Friendly;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查faction1是否明确将faction2列为中立
|
||||||
|
if (faction1.neutralFactions != null && faction1.neutralFactions.Contains(factionName2))
|
||||||
|
{
|
||||||
|
return Relation.Neutral;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果faction1没有明确设置与faction2的关系,则使用faction1的默认关系
|
||||||
|
return faction1.defaultRelation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置两个阵营之间的关系
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="factionName1">第一个阵营名称</param>
|
||||||
|
/// <param name="factionName2">第二个阵营名称</param>
|
||||||
|
/// <param name="relation">要设置的关系</param>
|
||||||
|
public void SetRelation(string factionName1, string factionName2, Relation relation)
|
||||||
|
{
|
||||||
|
// 不能设置自己与自己的关系
|
||||||
|
if (factionName1 == factionName2)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Cannot set relation between the same faction");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保两个阵营都存在
|
||||||
|
if (!_affiliations.TryGetValue(factionName1, out var faction1) ||
|
||||||
|
!_affiliations.TryGetValue(factionName2, out _))
|
||||||
|
{
|
||||||
|
throw new ArgumentException("One or both factions do not exist");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保关系列表已初始化
|
||||||
|
faction1.hostileFactions ??= new List<string>();
|
||||||
|
faction1.friendlyFactions ??= new List<string>();
|
||||||
|
faction1.neutralFactions ??= new List<string>();
|
||||||
|
|
||||||
|
// 先移除所有现有关系
|
||||||
|
faction1.hostileFactions.Remove(factionName2);
|
||||||
|
faction1.friendlyFactions.Remove(factionName2);
|
||||||
|
faction1.neutralFactions.Remove(factionName2);
|
||||||
|
|
||||||
|
// 添加新关系
|
||||||
|
switch (relation)
|
||||||
|
{
|
||||||
|
case Relation.Hostile:
|
||||||
|
faction1.hostileFactions.Add(factionName2);
|
||||||
|
break;
|
||||||
|
case Relation.Friendly:
|
||||||
|
faction1.friendlyFactions.Add(factionName2);
|
||||||
|
break;
|
||||||
|
case Relation.Neutral:
|
||||||
|
faction1.neutralFactions.Add(factionName2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(relation), relation, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查并修复派系关系,确保没有冲突(按友好 > 敌对 > 中立 的优先级)
|
||||||
|
/// </summary>
|
||||||
|
private void ValidateAndFixRelationships()
|
||||||
|
{
|
||||||
|
foreach (var faction in _affiliations.Values)
|
||||||
|
{
|
||||||
|
// 确保所有关系列表已初始化
|
||||||
|
faction.hostileFactions ??= new List<string>();
|
||||||
|
faction.friendlyFactions ??= new List<string>();
|
||||||
|
faction.neutralFactions ??= new List<string>();
|
||||||
|
|
||||||
|
// 检查所有敌对派系
|
||||||
|
foreach (var hostileFaction in faction.hostileFactions.ToList())
|
||||||
|
{
|
||||||
|
// 如果敌对派系同时存在于友好列表中,移除敌对关系(友好优先)
|
||||||
|
if (faction.friendlyFactions.Contains(hostileFaction))
|
||||||
|
{
|
||||||
|
faction.hostileFactions.Remove(hostileFaction);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果敌对派系同时存在于中立列表中,移除中立关系(敌对优先)
|
||||||
|
if (faction.neutralFactions.Contains(hostileFaction))
|
||||||
|
{
|
||||||
|
faction.neutralFactions.Remove(hostileFaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查所有中立派系
|
||||||
|
foreach (var neutralFaction in faction.neutralFactions.ToList())
|
||||||
|
{
|
||||||
|
// 如果中立派系同时存在于友好列表中,移除中立关系(友好优先)
|
||||||
|
if (faction.friendlyFactions.Contains(neutralFaction))
|
||||||
|
{
|
||||||
|
faction.neutralFactions.Remove(neutralFaction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 31017ce35a6b441fb36e085dd3fd7c27
|
||||||
|
timeCreated: 1755407963
|
@ -158,20 +158,20 @@ namespace Managers
|
|||||||
{
|
{
|
||||||
if (defRef.Item1 == null)
|
if (defRef.Item1 == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("defRef.Item1 为 null!");
|
Debug.LogError("被引用定义为 null!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defRef.Item2 == null)
|
if (defRef.Item2 == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("defRef.Item2 为 null!");
|
Debug.LogError("被引用定义的字段引用为 null!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var value = FindDefine(defRef.Item3.description, defRef.Item3.defName);
|
var value = FindDefine(defRef.Item3.description, defRef.Item3.defName);
|
||||||
if (value == null)
|
if (value == null)
|
||||||
{
|
{
|
||||||
Debug.LogError($"FindDefine 返回 null: description={defRef.Item3.description}, defName={defRef.Item3.defName}");
|
Debug.LogError($"未找到引用,出错的定义:定义类型:{defRef.Item1.GetType().Name}, 定义名:{defRef.Item1.defName} ; 类型:{defRef.Item3.description}, 定义名:{defRef.Item3.defName}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,27 +2,36 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Base;
|
using Base;
|
||||||
|
using Entity;
|
||||||
using Prefab;
|
using Prefab;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
namespace Managers
|
namespace Managers
|
||||||
{
|
{
|
||||||
public class EntityManage:Utils.MonoSingleton<EntityManage>,ITick
|
public class EntityManage : Utils.MonoSingleton<EntityManage>, ITick
|
||||||
{
|
{
|
||||||
public Dictionary<string, List<EntityPrefab>> factionEntities = new();
|
public Dictionary<string, LinkedList<EntityPrefab>> factionEntities = new();
|
||||||
|
|
||||||
public GameObject entityLevel;
|
public EntityPrefab characterPrefab;
|
||||||
public EntityPrefab entityPrefab;
|
public EntityPrefab buildingPrefab;
|
||||||
|
public EntityPrefab bulletPrefab;
|
||||||
|
|
||||||
public EntityPrefab defaultEntityPrefab;
|
public EntityPrefab defaultEntityPrefab;
|
||||||
public List<EntityPrefab> FindEntitiesByFaction(string factionKey)
|
|
||||||
|
private Dictionary<string, Transform> layerCache = new Dictionary<string, Transform>();
|
||||||
|
private List<Tuple<string, EntityPrefab>> pendingAdditions = new();
|
||||||
|
|
||||||
|
public LinkedList<EntityPrefab> FindEntitiesByFaction(string factionKey)
|
||||||
{
|
{
|
||||||
if (factionEntities.TryGetValue(factionKey, out var entities))
|
if (factionEntities.TryGetValue(factionKey, out var entities))
|
||||||
{
|
{
|
||||||
return entities; // 如果找到,返回对应的实体列表
|
return entities; // 如果找到,返回对应的实体列表
|
||||||
}
|
}
|
||||||
return new List<EntityPrefab>(); // 如果未找到,返回一个空列表
|
|
||||||
|
return new(); // 如果未找到,返回一个空列表
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
foreach (var faction in factionEntities)
|
foreach (var faction in factionEntities)
|
||||||
@ -41,6 +50,7 @@ namespace Managers
|
|||||||
itike.Tick();
|
itike.Tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除所有标记为死亡的实体
|
// 删除所有标记为死亡的实体
|
||||||
foreach (var entityToRemove in entitiesToRemove)
|
foreach (var entityToRemove in entitiesToRemove)
|
||||||
{
|
{
|
||||||
@ -48,91 +58,229 @@ namespace Managers
|
|||||||
Destroy(entityToRemove.gameObject);
|
Destroy(entityToRemove.gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pendingAdditions.Any())
|
||||||
|
{
|
||||||
|
foreach (var entity in pendingAdditions)
|
||||||
|
{
|
||||||
|
if (!factionEntities.ContainsKey(entity.Item1))
|
||||||
|
{
|
||||||
|
factionEntities[entity.Item1] = new LinkedList<EntityPrefab>();
|
||||||
|
}
|
||||||
|
|
||||||
|
factionEntities[entity.Item1].AddLast(entity.Item2);
|
||||||
|
}
|
||||||
|
|
||||||
|
pendingAdditions.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据给定的PawnDef生成一个实体对象。
|
/// 根据给定的Def生成实体对象(内部通用方法)。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pawnDef">定义实体属性的PawnDef对象。</param>
|
/// <param name="prefab">要实例化的预制体</param>
|
||||||
/// <param name="pos">实体生成的位置。</param>
|
/// <param name="parent">生成的父级Transform</param>
|
||||||
/// <remarks>
|
/// <param name="pos">生成位置</param>
|
||||||
/// 1. 如果entityPrefab或pawnDef为null,则不会生成实体。
|
/// <param name="def">实体定义对象</param>
|
||||||
/// 2. 实体将被创建在entityLevel.transform下。
|
/// <param name="extraInit">额外的初始化操作(如子弹方向设置)</param>
|
||||||
/// 3. 使用EntityPrefab组件初始化实体。
|
/// <returns>成功时返回EntityPrefab组件,失败时返回null</returns>
|
||||||
/// </remarks>
|
private EntityPrefab GenerateEntityInternal(
|
||||||
public void GenerateEntity(Data.PawnDef pawnDef, Vector3 pos)
|
GameObject prefab,
|
||||||
|
Transform parent,
|
||||||
|
Vector3 pos,
|
||||||
|
Data.EntityDef def, // 所有Def类型需继承自BaseDef
|
||||||
|
Action<EntityPrefab> extraInit = null)
|
||||||
{
|
{
|
||||||
// 检查 entityPrefab 是否为空
|
GameObject instantiatedEntity = null;
|
||||||
if (entityPrefab == null)
|
|
||||||
{
|
|
||||||
Debug.LogError("Error: entityPrefab is null. Please assign a valid prefab.");
|
|
||||||
GenerateDefaultEntity(pos);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 检查 pawnDef 是否为空
|
|
||||||
if (pawnDef == null)
|
|
||||||
{
|
|
||||||
Debug.LogError("Error: PawnDef is null. Cannot generate entity without a valid PawnDef.");
|
|
||||||
GenerateDefaultEntity(pos);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
GameObject instantiatedEntity = null; // 用于跟踪已实例化的对象
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 实例化实体对象
|
// 实例化实体
|
||||||
instantiatedEntity = Instantiate(entityPrefab.gameObject, pos, Quaternion.identity, entityLevel.transform);
|
instantiatedEntity = Instantiate(prefab, pos, Quaternion.identity, parent);
|
||||||
|
|
||||||
// 获取 EntityPrefab 组件
|
// 获取并验证EntityPrefab组件
|
||||||
var entityComponent = instantiatedEntity.GetComponent<EntityPrefab>();
|
var entityComponent = instantiatedEntity.GetComponent<EntityPrefab>();
|
||||||
|
if (!entityComponent)
|
||||||
// 检查 EntityPrefab 组件是否存在
|
|
||||||
if (entityComponent == null)
|
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Error: EntityPrefab component not found on the instantiated object: {instantiatedEntity.name}");
|
throw new InvalidOperationException(
|
||||||
|
$"EntityPrefab component missing on: {instantiatedEntity.name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化实体组件
|
// 初始化核心数据
|
||||||
entityComponent.Init(pawnDef);
|
entityComponent.Init(def);
|
||||||
|
|
||||||
// 确保派系键存在,并初始化对应的列表
|
// 执行类型特有的额外初始化
|
||||||
var factionKey = pawnDef.attributes.label ?? "default"; // 使用 null 合并运算符简化代码
|
extraInit?.Invoke(entityComponent);
|
||||||
if (!factionEntities.ContainsKey(factionKey))
|
|
||||||
{
|
// 管理派系列表
|
||||||
factionEntities[factionKey] = new List<EntityPrefab>();
|
var factionKey = def.attributes.defName ?? "default";
|
||||||
}
|
pendingAdditions.Add(Tuple.Create(factionKey, entityComponent));
|
||||||
factionEntities[factionKey].Add(entityComponent);
|
return entityComponent;
|
||||||
}
|
}
|
||||||
catch (System.Exception ex)
|
catch (System.Exception ex)
|
||||||
{
|
{
|
||||||
// 如果有已实例化的对象,则销毁它
|
// 清理失败实例
|
||||||
if (instantiatedEntity != null)
|
if (instantiatedEntity) Destroy(instantiatedEntity);
|
||||||
{
|
|
||||||
Destroy(instantiatedEntity); // 删除已创建的对象
|
|
||||||
}
|
|
||||||
|
|
||||||
// 捕获并记录任何异常
|
Debug.LogError($"Entity generation failed: {ex.Message}\n{ex.StackTrace}");
|
||||||
Debug.LogError($"An error occurred while generating the entity: {ex.Message}\nStack Trace: {ex.StackTrace}");
|
return null;
|
||||||
|
|
||||||
// 调用默认生成方法
|
|
||||||
GenerateDefaultEntity(pos);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 动态创建层(如果层不存在)
|
||||||
|
/// </summary>
|
||||||
|
private Transform EnsureLayerExists(string layerName)
|
||||||
|
{
|
||||||
|
// 先从缓存中查找
|
||||||
|
if (layerCache.TryGetValue(layerName, out var layerTransform))
|
||||||
|
{
|
||||||
|
return layerTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果缓存中没有,尝试通过 transform.Find 查找
|
||||||
|
layerTransform = transform.Find(layerName);
|
||||||
|
|
||||||
|
if (!layerTransform)
|
||||||
|
{
|
||||||
|
// 如果层不存在,动态创建
|
||||||
|
var layerObject = new GameObject(layerName);
|
||||||
|
layerTransform = layerObject.transform;
|
||||||
|
layerTransform.SetParent(transform, false); // 将层附加到当前管理器下
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将新创建的层加入缓存
|
||||||
|
layerCache[layerName] = layerTransform;
|
||||||
|
|
||||||
|
return layerTransform;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据PawnDef生成普通实体
|
||||||
|
/// </summary>
|
||||||
|
public void GenerateEntity(Data.EntityDef entityDef, Vector3 pos)
|
||||||
|
{
|
||||||
|
// 验证关键参数
|
||||||
|
if (!characterPrefab)
|
||||||
|
{
|
||||||
|
Debug.LogError("entityPrefab is null! Assign a valid prefab.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entityDef == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("EntityDef is null! Cannot generate entity.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保层存在
|
||||||
|
var entityLevelTransform = EnsureLayerExists("EntityLevel");
|
||||||
|
|
||||||
|
// 调用通用生成逻辑
|
||||||
|
var result = GenerateEntityInternal(
|
||||||
|
characterPrefab.gameObject,
|
||||||
|
entityLevelTransform,
|
||||||
|
pos,
|
||||||
|
entityDef
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!result) GenerateDefaultEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成建筑实体(位置使用Vector3Int)
|
||||||
|
/// </summary>
|
||||||
|
public void GenerateBuildingEntity(Data.BuildingDef buildingDef, Vector3Int pos)
|
||||||
|
{
|
||||||
|
// 修正:检查正确的预制体 (buildingPrefab)
|
||||||
|
if (!buildingPrefab)
|
||||||
|
{
|
||||||
|
Debug.LogError("buildingPrefab is null! Assign a valid prefab.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buildingDef == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("BuildingDef is null! Cannot generate building.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var worldPos = new Vector3(pos.x, pos.y, pos.z);
|
||||||
|
|
||||||
|
// 确保层存在
|
||||||
|
var buildingLevelTransform = EnsureLayerExists("BuildingLevel");
|
||||||
|
|
||||||
|
var result = GenerateEntityInternal(
|
||||||
|
buildingPrefab.gameObject,
|
||||||
|
buildingLevelTransform,
|
||||||
|
worldPos,
|
||||||
|
buildingDef
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!result) GenerateDefaultEntity(worldPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成子弹实体(含方向设置)
|
||||||
|
/// </summary>
|
||||||
|
public void GenerateBulletEntity(Data.BulletDef bulletDef, Vector3 pos, Vector3 dir,
|
||||||
|
Entity.Entity source = null)
|
||||||
|
{
|
||||||
|
// 修正:检查正确的预制体 (bulletPrefab)
|
||||||
|
if (!bulletPrefab)
|
||||||
|
{
|
||||||
|
Debug.LogError("bulletPrefab is null! Assign a valid prefab.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bulletDef == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("BulletDef is null! Cannot generate bullet.");
|
||||||
|
GenerateDefaultEntity(pos);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保层存在
|
||||||
|
var bulletLevelTransform = EnsureLayerExists("BulletLevel");
|
||||||
|
|
||||||
|
var result = GenerateEntityInternal(
|
||||||
|
bulletPrefab.gameObject,
|
||||||
|
bulletLevelTransform,
|
||||||
|
pos,
|
||||||
|
bulletDef,
|
||||||
|
// 子弹特有的方向设置
|
||||||
|
entityComponent => entityComponent.entity.SetTarget(pos + dir)
|
||||||
|
);
|
||||||
|
if (result.entity is Bullet bullet)
|
||||||
|
{
|
||||||
|
bullet.bulletSource = source;
|
||||||
|
if (source) bullet.affiliation = source.affiliation;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!result) GenerateDefaultEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成默认实体(错误回退)
|
||||||
|
/// </summary>
|
||||||
public void GenerateDefaultEntity(Vector3 pos)
|
public void GenerateDefaultEntity(Vector3 pos)
|
||||||
{
|
{
|
||||||
var entity = Instantiate(defaultEntityPrefab.gameObject, pos, Quaternion.identity, entityLevel.transform);
|
// 确保层存在
|
||||||
|
var entityLevelTransform = EnsureLayerExists("EntityLevel");
|
||||||
|
|
||||||
|
var entity = Instantiate(defaultEntityPrefab, pos, Quaternion.identity, entityLevelTransform);
|
||||||
var entityComponent = entity.GetComponent<EntityPrefab>();
|
var entityComponent = entity.GetComponent<EntityPrefab>();
|
||||||
|
|
||||||
const string factionKey = "default";
|
const string factionKey = "default";
|
||||||
if (!factionEntities.ContainsKey(factionKey))
|
pendingAdditions.Add(Tuple.Create(factionKey, entityComponent));
|
||||||
{
|
|
||||||
factionEntities[factionKey] = new List<EntityPrefab>();
|
|
||||||
}
|
|
||||||
entityComponent.DefaultInit();
|
entityComponent.DefaultInit();
|
||||||
factionEntities[factionKey].Add(entityComponent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnStart()
|
protected override void OnStart()
|
||||||
{
|
{
|
||||||
factionEntities.Clear();
|
factionEntities.Clear();
|
||||||
@ -143,7 +291,7 @@ namespace Managers
|
|||||||
{
|
{
|
||||||
var pre = Resources.Load<GameObject>("Default/DefaultEntity");
|
var pre = Resources.Load<GameObject>("Default/DefaultEntity");
|
||||||
defaultEntityPrefab = pre.GetComponent<EntityPrefab>();
|
defaultEntityPrefab = pre.GetComponent<EntityPrefab>();
|
||||||
|
layerCache.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
47
Client/Assets/Scripts/Managers/ItemResourceManager.cs
Normal file
47
Client/Assets/Scripts/Managers/ItemResourceManager.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Data;
|
||||||
|
using Item;
|
||||||
|
|
||||||
|
namespace Managers
|
||||||
|
{
|
||||||
|
public class ItemResourceManager:Utils.Singleton<ItemResourceManager>
|
||||||
|
{
|
||||||
|
//定义名,物品
|
||||||
|
public Dictionary<string,Item.ItemResource> items;
|
||||||
|
|
||||||
|
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
var itemDefs = Managers.DefineManager.Instance.QueryDefinesByType<ItemDef>();
|
||||||
|
if(itemDefs==null||itemDefs.Length==0)
|
||||||
|
return;
|
||||||
|
foreach (var itemDef in itemDefs)
|
||||||
|
{
|
||||||
|
var item=new Item.ItemResource();
|
||||||
|
item.name = itemDef.label;
|
||||||
|
item.description = itemDef.description;
|
||||||
|
|
||||||
|
item.icon = Managers.PackagesImageManager.Instance.GetSprite(itemDef.texture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemResource GetItem(string defName)
|
||||||
|
{
|
||||||
|
return items.GetValueOrDefault(defName,null);
|
||||||
|
}
|
||||||
|
// <summary>
|
||||||
|
/// 按物品名称查找物品
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="itemName">要查找的物品名称</param>
|
||||||
|
/// <returns>找到的物品对象,如果未找到则返回 null</returns>
|
||||||
|
public ItemResource FindItemByName(string itemName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(itemName))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return items.Values.FirstOrDefault(item => item.name == itemName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eafd50f3a0594a6e845ecf87b04744ce
|
||||||
|
timeCreated: 1755062360
|
@ -90,16 +90,16 @@ namespace Managers
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 判断是否为 Unity 资源路径
|
// 判断是否为 Unity 资源路径
|
||||||
bool isUnityResource = drawOrder.texturePath.StartsWith("res:", StringComparison.OrdinalIgnoreCase);
|
var isUnityResource = drawOrder.texturePath.StartsWith("res:", StringComparison.OrdinalIgnoreCase);
|
||||||
string rootPath = packRootSite[drawOrder.packID];
|
var rootPath = packRootSite[drawOrder.packID];
|
||||||
|
|
||||||
if (isUnityResource)
|
if (isUnityResource)
|
||||||
{
|
{
|
||||||
// 移除 "res:" 前缀并适配 Unity 资源路径规则
|
// 移除 "res:" 前缀并适配 Unity 资源路径规则
|
||||||
string resourceFolder = drawOrder.texturePath.Substring(4).TrimStart('/').Replace('\\', '/');
|
var resourceFolder = drawOrder.texturePath.Substring(4).TrimStart('/').Replace('\\', '/');
|
||||||
|
|
||||||
// 加载文件夹下的所有纹理资源
|
// 加载文件夹下的所有纹理资源
|
||||||
Texture2D[] textures = Resources.LoadAll<Texture2D>(resourceFolder);
|
var textures = Resources.LoadAll<Texture2D>(resourceFolder);
|
||||||
if (textures == null || textures.Length == 0)
|
if (textures == null || textures.Length == 0)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"No textures found in Unity resource folder: {resourceFolder}");
|
Debug.LogWarning($"No textures found in Unity resource folder: {resourceFolder}");
|
||||||
@ -124,7 +124,6 @@ namespace Managers
|
|||||||
new Vector2(0.5f, 0.5f), // 中心点
|
new Vector2(0.5f, 0.5f), // 中心点
|
||||||
drawOrder.pixelsPerUnit
|
drawOrder.pixelsPerUnit
|
||||||
);
|
);
|
||||||
|
|
||||||
var name = image.name;
|
var name = image.name;
|
||||||
|
|
||||||
// 插入纹理
|
// 插入纹理
|
||||||
@ -270,6 +269,10 @@ namespace Managers
|
|||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Sprite GetSprite(ImageDef ima)
|
||||||
|
{
|
||||||
|
return GetSprite(ima.packID,ima.name);
|
||||||
|
}
|
||||||
public Sprite GetSprite(string packID, string name)
|
public Sprite GetSprite(string packID, string name)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(packID))
|
if (string.IsNullOrEmpty(packID))
|
||||||
@ -343,14 +346,14 @@ namespace Managers
|
|||||||
if (!bodyTexture.TryGetValue(packageName, out var packageDict))
|
if (!bodyTexture.TryGetValue(packageName, out var packageDict))
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"Package '{packageName}' not found.");
|
Debug.LogWarning($"Package '{packageName}' not found.");
|
||||||
return Array.Empty<Sprite>();
|
return new[] { defaultSprite };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查文件路径是否存在
|
// 检查文件路径是否存在
|
||||||
if (!packageDict.TryGetValue(filePath, out var pathDict))
|
if (!packageDict.TryGetValue(filePath, out var pathDict))
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"File path '{filePath}' not found in package '{packageName}'.");
|
Debug.LogWarning($"File path '{filePath}' not found in package '{packageName}'.");
|
||||||
return Array.Empty<Sprite>();
|
return new[] { defaultSprite };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收集所有匹配的Sprite
|
// 收集所有匹配的Sprite
|
||||||
@ -374,7 +377,7 @@ namespace Managers
|
|||||||
// 尝试解析编号
|
// 尝试解析编号
|
||||||
if (int.TryParse(suffix, out var number))
|
if (int.TryParse(suffix, out var number))
|
||||||
{
|
{
|
||||||
sprites.Add((number, Value: value));
|
sprites.Add((number, value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
63
Client/Assets/Scripts/Managers/RightMenuManager.cs
Normal file
63
Client/Assets/Scripts/Managers/RightMenuManager.cs
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Prefab;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
|
namespace Managers
|
||||||
|
{
|
||||||
|
public class RightMenuManager:Utils.MonoSingleton<RightMenuManager>
|
||||||
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject _canvas;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private RightMenuPrefab _rightMenuPrefab;
|
||||||
|
|
||||||
|
public GameObject Canvas
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_canvas == null)
|
||||||
|
{
|
||||||
|
_canvas = GameObject.Find("Canvas"); // 根据你的实际场景修改查找条件
|
||||||
|
if (_canvas == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("RightMenu Canvas not found in scene!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _canvas;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public RightMenuPrefab RightMenuPrefab
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_rightMenuPrefab == null)
|
||||||
|
{
|
||||||
|
_rightMenuPrefab = Resources.Load<RightMenuPrefab>("Prefab/RightMenu");
|
||||||
|
if (_rightMenuPrefab == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("RightMenuPrefab not found in Resources!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _rightMenuPrefab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void GenerateRightMenu(List<(string name, UnityAction callback)> buttons,Vector3 position)
|
||||||
|
{
|
||||||
|
var rightMenuObj = Instantiate(RightMenuManager.Instance.RightMenuPrefab.gameObject,
|
||||||
|
RightMenuManager.Instance.Canvas.transform);
|
||||||
|
var rightMenu=rightMenuObj.GetComponent<RightMenuPrefab>();
|
||||||
|
rightMenu.Init(buttons);
|
||||||
|
rightMenu.transform.position = position;
|
||||||
|
rightMenu.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnStart()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Managers/RightMenuManager.cs.meta
Normal file
3
Client/Assets/Scripts/Managers/RightMenuManager.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 409b8017bbd6443eb2dde17ea6fd5e29
|
||||||
|
timeCreated: 1755526878
|
@ -5,30 +5,57 @@ using UnityEngine.Tilemaps;
|
|||||||
|
|
||||||
namespace Managers
|
namespace Managers
|
||||||
{
|
{
|
||||||
public class TileManager:Utils.Singleton<TileManager>
|
/// <summary>
|
||||||
|
/// 瓦片管理器,用于加载、初始化和管理瓦片资源。
|
||||||
|
/// </summary>
|
||||||
|
public class TileManager : Utils.Singleton<TileManager>
|
||||||
{
|
{
|
||||||
public Dictionary<string,TileBase> tileBaseMapping = new();
|
/// <summary>
|
||||||
|
/// 存储瓦片名称与瓦片对象的映射关系。
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, TileBase> tileBaseMapping = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储瓦片索引与瓦片对象的映射关系。
|
||||||
|
/// 索引由四个整数组成,表示瓦片的组合方式。
|
||||||
|
/// </summary>
|
||||||
public Dictionary<(int, int, int, int), TileBase> tileToTileBaseMapping = new();
|
public Dictionary<(int, int, int, int), TileBase> tileToTileBaseMapping = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储瓦片名称与唯一 ID 的映射关系。
|
||||||
|
/// </summary>
|
||||||
public Dictionary<string, int> tileID = new();
|
public Dictionary<string, int> tileID = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化瓦片管理器。
|
||||||
|
/// 加载所有瓦片定义、纹理映射表,并生成对应的瓦片对象。
|
||||||
|
/// </summary>
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
if (tileToTileBaseMapping.Count > 0)
|
if (tileToTileBaseMapping.Count > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// 初始化图像包管理器
|
||||||
Managers.PackagesImageManager.Instance.Init();
|
Managers.PackagesImageManager.Instance.Init();
|
||||||
var imagePack = Managers.PackagesImageManager.Instance;
|
var imagePack = Managers.PackagesImageManager.Instance;
|
||||||
|
|
||||||
|
// 获取所有瓦片定义
|
||||||
var tileType = Managers.DefineManager.Instance.QueryDefinesByType<TileDef>();
|
var tileType = Managers.DefineManager.Instance.QueryDefinesByType<TileDef>();
|
||||||
for (var i = 0; i < tileType.Length; i++)
|
for (var i = 0; i < tileType.Length; i++)
|
||||||
{
|
{
|
||||||
tileID.Add(tileType[i].name, i);
|
tileID.Add(tileType[i].name, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
var tileTextureMappingDef=Managers.DefineManager.Instance.QueryDefinesByType<TileMappingTableDef>();
|
// 处理瓦片纹理映射表定义
|
||||||
|
var tileTextureMappingDef = Managers.DefineManager.Instance.QueryDefinesByType<TileMappingTableDef>();
|
||||||
foreach (var mappingTableDef in tileTextureMappingDef)
|
foreach (var mappingTableDef in tileTextureMappingDef)
|
||||||
{
|
{
|
||||||
foreach (var keyVal in mappingTableDef.tileDict)
|
foreach (var keyVal in mappingTableDef.tileDict)
|
||||||
{
|
{
|
||||||
var key = keyVal.Key;
|
var key = keyVal.Key;
|
||||||
var val = keyVal.Value;
|
var val = keyVal.Value;
|
||||||
|
|
||||||
|
// 检查键值格式是否合法
|
||||||
var parts = key.Split('_');
|
var parts = key.Split('_');
|
||||||
if (parts.Length != 4)
|
if (parts.Length != 4)
|
||||||
{
|
{
|
||||||
@ -37,6 +64,7 @@ namespace Managers
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查键值中是否存在未定义的瓦片名称
|
||||||
if (!(tileID.TryGetValue(parts[0], out var k1) &&
|
if (!(tileID.TryGetValue(parts[0], out var k1) &&
|
||||||
tileID.TryGetValue(parts[1], out var k2) &&
|
tileID.TryGetValue(parts[1], out var k2) &&
|
||||||
tileID.TryGetValue(parts[2], out var k3) &&
|
tileID.TryGetValue(parts[2], out var k3) &&
|
||||||
@ -47,7 +75,8 @@ namespace Managers
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sprite = imagePack.GetSprite(mappingTableDef.packID,val);
|
// 获取对应精灵
|
||||||
|
var sprite = imagePack.GetSprite(mappingTableDef.packID, val);
|
||||||
if (sprite == null)
|
if (sprite == null)
|
||||||
{
|
{
|
||||||
var packName = Managers.DefineManager.Instance.GetDefinePackageName(mappingTableDef);
|
var packName = Managers.DefineManager.Instance.GetDefinePackageName(mappingTableDef);
|
||||||
@ -55,6 +84,7 @@ namespace Managers
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查是否存在重复索引
|
||||||
if (tileToTileBaseMapping.ContainsKey((k1, k2, k3, k4)))
|
if (tileToTileBaseMapping.ContainsKey((k1, k2, k3, k4)))
|
||||||
{
|
{
|
||||||
var packName = Managers.DefineManager.Instance.GetDefinePackageName(mappingTableDef);
|
var packName = Managers.DefineManager.Instance.GetDefinePackageName(mappingTableDef);
|
||||||
@ -62,6 +92,7 @@ namespace Managers
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载瓦片并存储到映射表中
|
||||||
var tile = LoadTile(sprite);
|
var tile = LoadTile(sprite);
|
||||||
tileToTileBaseMapping[(k1, k2, k3, k4)] = tile;
|
tileToTileBaseMapping[(k1, k2, k3, k4)] = tile;
|
||||||
tileBaseMapping[val] = tile;
|
tileBaseMapping[val] = tile;
|
||||||
@ -69,18 +100,28 @@ namespace Managers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重新加载瓦片管理器。
|
||||||
|
/// 清空当前的瓦片映射表并重新初始化。
|
||||||
|
/// </summary>
|
||||||
public void Reload()
|
public void Reload()
|
||||||
{
|
{
|
||||||
tileToTileBaseMapping.Clear();
|
tileToTileBaseMapping.Clear();
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileBase LoadTile(Sprite sprite)
|
/// <summary>
|
||||||
|
/// 将精灵加载为瓦片对象。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sprite">要加载的精灵。</param>
|
||||||
|
/// <param name="colliderType">瓦片的碰撞体类型,默认为 None。</param>
|
||||||
|
/// <returns>返回加载成功的瓦片对象。</returns>
|
||||||
|
public TileBase LoadTile(Sprite sprite, Tile.ColliderType colliderType = Tile.ColliderType.None)
|
||||||
{
|
{
|
||||||
var newTile = ScriptableObject.CreateInstance<Tile>();
|
var newTile = ScriptableObject.CreateInstance<Tile>();
|
||||||
newTile.sprite = sprite;
|
newTile.sprite = sprite;
|
||||||
newTile.color = Color.white;
|
newTile.color = Color.white;
|
||||||
newTile.colliderType = Tile.ColliderType.Sprite;
|
newTile.colliderType = colliderType;
|
||||||
return newTile;
|
return newTile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,103 +9,155 @@ namespace Map
|
|||||||
{
|
{
|
||||||
public class DoubleMap : MonoBehaviour
|
public class DoubleMap : MonoBehaviour
|
||||||
{
|
{
|
||||||
public List<List<int>> mapData = new();
|
public List<List<int>> mapData = new List<List<int>>();
|
||||||
public Tilemap textureLevel;
|
public Tilemap textureLevel;
|
||||||
|
public Vector2Int dataOffset = Vector2Int.zero; // 数据起始点偏移变量
|
||||||
public Dictionary<string, TileBase> tileDict = new();
|
// 初始化地图数据大小
|
||||||
|
public void InitializeData(int width, int height, int defaultValue = 0)
|
||||||
private int offsetX = 0; // 地图数据的 X 偏移量
|
|
||||||
private int offsetY = 0; // 地图数据的 Y 偏移量
|
|
||||||
|
|
||||||
void Start()
|
|
||||||
{
|
{
|
||||||
|
mapData.Clear();
|
||||||
|
for (int x = 0; x < width; x++)
|
||||||
|
{
|
||||||
|
List<int> column = new List<int>();
|
||||||
|
for (int y = 0; y < height; y++)
|
||||||
|
{
|
||||||
|
column.Add(defaultValue);
|
||||||
|
}
|
||||||
|
mapData.Add(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 设置指定数据坐标的瓦片值并刷新相关瓦片
|
||||||
|
public void SetTile(int dataX, int dataY, int value)
|
||||||
|
{
|
||||||
|
// 检查坐标是否有效
|
||||||
|
if (dataX < 0 || dataY < 0 || dataX >= mapData.Count || dataY >= mapData[0].Count)
|
||||||
|
{
|
||||||
|
Debug.LogError($"SetTile: 坐标({dataX},{dataY})超出范围");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新数据
|
||||||
|
mapData[dataX][dataY] = value;
|
||||||
|
|
||||||
UpdateTexture();
|
// 刷新受影响的瓦片(当前点作为四个角影响的瓦片)
|
||||||
|
RefreshTile(dataX, dataY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateTexture()
|
// 获取指定数据坐标的瓦片值
|
||||||
|
public int GetTile(int dataX, int dataY)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < mapData.Count; i++)
|
if (dataX < 0 || dataY < 0 || dataX >= mapData.Count || dataY >= mapData[0].Count)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < mapData[i].Count; j++)
|
Debug.LogError($"GetTile: 坐标({dataX},{dataY})超出范围");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mapData[dataX][dataY];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新指定数据点影响的瓦片
|
||||||
|
public void RefreshTile(int dataX, int dataY)
|
||||||
|
{
|
||||||
|
// 计算该数据点影响的四个瓦片位置(该点作为四个角)
|
||||||
|
Vector2Int[] affectedTiles = new Vector2Int[]
|
||||||
|
{
|
||||||
|
new Vector2Int(dataX - 1, dataY - 1), // 作为右下角
|
||||||
|
new Vector2Int(dataX - 1, dataY), // 作为右上角
|
||||||
|
new Vector2Int(dataX, dataY - 1), // 作为左下角
|
||||||
|
new Vector2Int(dataX, dataY) // 作为左上角
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var tilePos in affectedTiles)
|
||||||
|
{
|
||||||
|
UpdateTileAtTilemapPosition(tilePos.x, tilePos.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新整个瓦片地图
|
||||||
|
public void RefreshAllTiles()
|
||||||
|
{
|
||||||
|
if (mapData.Count == 0 || mapData[0].Count == 0) return;
|
||||||
|
|
||||||
|
// 计算瓦片地图的有效范围(考虑偏移)
|
||||||
|
int startX = dataOffset.x;
|
||||||
|
int startY = dataOffset.y;
|
||||||
|
int endX = startX + mapData.Count - 1;
|
||||||
|
int endY = startY + mapData[0].Count - 1;
|
||||||
|
|
||||||
|
// 遍历所有瓦片位置
|
||||||
|
for (int x = startX; x <= endX; x++)
|
||||||
|
{
|
||||||
|
for (int y = startY; y <= endY; y++)
|
||||||
{
|
{
|
||||||
UpdateTexture(i, j);
|
UpdateTileAtTilemapPosition(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetTile(int x, int y)
|
// 更新指定瓦片位置的显示
|
||||||
|
private void UpdateTileAtTilemapPosition(int tileX, int tileY)
|
||||||
{
|
{
|
||||||
// 转换为相对于 mapData 的索引
|
// 计算对应的数据坐标(考虑偏移)
|
||||||
int relativeX = x - offsetX;
|
int dataX = tileX - dataOffset.x;
|
||||||
int relativeY = y - offsetY;
|
int dataY = tileY - dataOffset.y;
|
||||||
|
|
||||||
if (relativeX < 0 || relativeX >= mapData.Count)
|
// 获取四个角的数据坐标
|
||||||
{
|
int topLeftX = dataX;
|
||||||
return 0;
|
int topLeftY = dataY;
|
||||||
}
|
int topRightX = dataX + 1;
|
||||||
|
int topRightY = dataY;
|
||||||
|
int bottomLeftX = dataX;
|
||||||
|
int bottomLeftY = dataY + 1;
|
||||||
|
int bottomRightX = dataX + 1;
|
||||||
|
int bottomRightY = dataY + 1;
|
||||||
|
|
||||||
var col = mapData[relativeX];
|
// 检查边界并获取值
|
||||||
if (relativeY < 0 || relativeY >= mapData.Count)
|
int topLeft = GetDataValue(topLeftX, topLeftY);
|
||||||
{
|
int topRight = GetDataValue(topRightX, topRightY);
|
||||||
return 0;
|
int bottomLeft = GetDataValue(bottomLeftX, bottomLeftY);
|
||||||
}
|
int bottomRight = GetDataValue(bottomRightX, bottomRightY);
|
||||||
|
|
||||||
return col[relativeY];
|
// 获取对应的瓦片
|
||||||
|
TileBase tile = GetTileFromManager(topLeft, topRight, bottomLeft, bottomRight);
|
||||||
|
|
||||||
|
// 设置到瓦片地图
|
||||||
|
Vector3Int position = new Vector3Int(tileX, tileY, 0);
|
||||||
|
textureLevel.SetTile(position, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTile(int x, int y, string tileName)
|
// 安全获取数据值(处理边界)
|
||||||
|
private int GetDataValue(int dataX, int dataY)
|
||||||
{
|
{
|
||||||
SetTile(x, y, TileManager.Instance.tileID.GetValueOrDefault(tileName));
|
if (dataX < 0 || dataY < 0 || dataX >= mapData.Count || dataY >= mapData[0].Count)
|
||||||
|
return 0; // 边界外返回默认值
|
||||||
|
return mapData[dataX][dataY];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetTile(int x, int y, int id)
|
// 从TileManager获取对应瓦片
|
||||||
|
private TileBase GetTileFromManager(int topLeft, int topRight, int bottomLeft, int bottomRight)
|
||||||
{
|
{
|
||||||
// 转换为相对于 mapData 的索引
|
TileManager manager = TileManager.Instance;
|
||||||
int relativeX = x - offsetX;
|
if (manager == null)
|
||||||
int relativeY = y - offsetY;
|
|
||||||
|
|
||||||
if (relativeX >= 0 && relativeX < mapData.Count &&
|
|
||||||
relativeY >= 0 && relativeY < mapData[relativeX].Count)
|
|
||||||
{
|
{
|
||||||
mapData[relativeX][relativeY] = id;
|
Debug.LogError("TileManager实例未找到");
|
||||||
UpdateTexture(x, y);
|
return null;
|
||||||
UpdateTexture(x, y - 1);
|
|
||||||
UpdateTexture(x - 1, y);
|
|
||||||
UpdateTexture(x - 1, y - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新对应坐标的贴图
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="x"></param>
|
|
||||||
/// <param name="y"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public void UpdateTexture(int x, int y)
|
|
||||||
{
|
|
||||||
// 转换为相对于 mapData 的索引
|
|
||||||
int relativeX = x - offsetX;
|
|
||||||
int relativeY = y - offsetY;
|
|
||||||
|
|
||||||
if (relativeX < 0 || relativeX >= mapData.Count ||
|
|
||||||
relativeY < 0 || relativeY >= mapData[relativeX].Count)
|
|
||||||
{
|
|
||||||
return; // 如果超出范围,直接返回
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var lt = GetTile(x, y + 1);
|
// 尝试获取组合键对应的瓦片
|
||||||
var rt = GetTile(x + 1, y + 1);
|
var key = (topLeft, topRight, bottomLeft, bottomRight);
|
||||||
var lb = GetTile(x, y);
|
if (manager.tileToTileBaseMapping.TryGetValue(key, out TileBase tile))
|
||||||
var rb = GetTile(x + 1, y);
|
|
||||||
|
|
||||||
if (TileManager.Instance.tileToTileBaseMapping.ContainsKey((lt, rt, lb, rb)))
|
|
||||||
{
|
{
|
||||||
textureLevel.SetTile(new Vector3Int(x, y, 0),
|
return tile;
|
||||||
TileManager.Instance.tileToTileBaseMapping[(lt, rt, lb, rb)]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 备用方案:尝试获取默认瓦片
|
||||||
|
if (manager.tileBaseMapping.TryGetValue("Default", out TileBase defaultTile))
|
||||||
|
{
|
||||||
|
return defaultTile;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.LogError($"未找到对应瓦片: {key}");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ using UnityEngine.Tilemaps;
|
|||||||
|
|
||||||
namespace Map
|
namespace Map
|
||||||
{
|
{
|
||||||
public class MapGenerator:MonoBehaviour
|
public class MapGenerator:Utils.MonoSingleton<MapGenerator>
|
||||||
{
|
{
|
||||||
public DoubleMap baseLevel;
|
public DoubleMap baseLevel;
|
||||||
public Tilemap buildLevel;
|
public Tilemap buildLevel;
|
||||||
@ -14,17 +14,27 @@ namespace Map
|
|||||||
{
|
{
|
||||||
var perline= Utils.PerlinNoise.Instance;
|
var perline= Utils.PerlinNoise.Instance;
|
||||||
int size = 100;
|
int size = 100;
|
||||||
for (int i = -size; i <= size; i++)
|
baseLevel.InitializeData(size, size);
|
||||||
{
|
baseLevel.RefreshAllTiles();
|
||||||
for (int j = -size; j <= size; j++)
|
}
|
||||||
{
|
|
||||||
var val = perline.Noise(i, j);
|
public bool CanPassThrough(int x, int y)
|
||||||
if (val < 0)
|
{
|
||||||
{
|
return GetTilePassCost(x, y) < 1;
|
||||||
|
}
|
||||||
|
public float GetTilePassCost(int x, int y)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float GetTileBulletCover(int x, int y)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnStart()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,9 +26,9 @@ namespace Prefab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(Data.PawnDef pawnDef)
|
public void Init(Data.EntityDef entityDef)
|
||||||
{
|
{
|
||||||
entity.Init(pawnDef);
|
entity.Init(entityDef);
|
||||||
|
|
||||||
outline.Init();
|
outline.Init();
|
||||||
outline.Hide();
|
outline.Hide();
|
||||||
|
18
Client/Assets/Scripts/Prefab/ProgressBarPrefab.cs
Normal file
18
Client/Assets/Scripts/Prefab/ProgressBarPrefab.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Prefab
|
||||||
|
{
|
||||||
|
public class ProgressBarPrefab:MonoBehaviour
|
||||||
|
{
|
||||||
|
public GameObject _progress;
|
||||||
|
public float Progress
|
||||||
|
{
|
||||||
|
get => _progress.transform.localScale.x;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
var x=Mathf.Clamp01(value);
|
||||||
|
_progress.transform.localScale = new Vector3(x, _progress.transform.localScale.y, _progress.transform.localScale.z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
Client/Assets/Scripts/Prefab/ProgressBarPrefab.cs.meta
Normal file
3
Client/Assets/Scripts/Prefab/ProgressBarPrefab.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 605f185650fe46d89a6e0d60fb8fb11c
|
||||||
|
timeCreated: 1755091112
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user