(client) feat:添加设置类,子弹添加敌我识别; chore:修改了右键菜单的初始化方式为独立创建,加载定义报错提供更多信息,动画加载出错也返回默认序列。

This commit is contained in:
m0_75251201
2025-08-19 14:36:22 +08:00
parent f67aca0804
commit f4cd5f4a86
57 changed files with 1000 additions and 788 deletions

View File

@ -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}

View File

@ -6,7 +6,7 @@ TextureImporter:
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
@ -37,13 +37,13 @@ TextureImporter:
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
@ -52,9 +52,9 @@ TextureImporter:
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
@ -100,7 +100,7 @@ TextureImporter:
customData:
physicsShape: []
bones: []
spriteID:
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:

View File

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

View File

@ -147,6 +147,7 @@ MonoBehaviour:
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}

View File

@ -151,6 +151,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: acf99b9aa18d4ab9b4ce796d513d476b, type: 3}
m_Name:
m_EditorClassIdentifier:
rightMenuPrefab: {fileID: 1536012154932022711, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
body: {fileID: 2838206730318674270}
outlineRenderer: {fileID: 3992139212329961548}
outlineCollider: {fileID: 1724818962207668775}

View 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}

View File

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

View File

@ -206,52 +206,6 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &143894350
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 143894352}
- component: {fileID: 143894351}
m_Layer: 0
m_Name: rightMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &143894351
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 143894350}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7f6fd5ff82ab4ce4aae8dd41118277f8, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
rightMenuPrefab: {fileID: 2120445622}
--- !u!4 &143894352
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 143894350}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.57229, y: 0.67653, 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
GameObject:
m_ObjectHideFlags: 0
@ -282,11 +236,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
entityLevel: {fileID: 1891846098}
entityPrefab: {fileID: 3420474218334607780, guid: 5218adfb8e855a9459df63de8b2f323c, type: 3}
buildingLevel: {fileID: 651025902}
characterPrefab: {fileID: 3420474218334607780, guid: 5218adfb8e855a9459df63de8b2f323c, type: 3}
buildingPrefab: {fileID: 5615006624229444611, guid: d7b9277d8e6ac4541800044bdb0da063, type: 3}
bulletLevel: {fileID: 466785510}
bulletPrefab: {fileID: 8687677644466399534, guid: 29b2450a8636a104586e36333878f4d9, type: 3}
defaultEntityPrefab: {fileID: 7975757421877276383, guid: 89661daa5f100c64783f0ad9cd37a7ff, type: 3}
--- !u!4 &164739122
@ -733,6 +684,53 @@ TilemapCollider2D:
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
GameObject:
m_ObjectHideFlags: 0
@ -878,7 +876,6 @@ RectTransform:
- {fileID: 2068504032}
- {fileID: 1672332560}
- {fileID: 1401161120}
- {fileID: 2120445621}
- {fileID: 689345800}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -1180,22 +1177,6 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 6806539210387795853, guid: 620f2670398686943a232c5a71a6f1d5, type: 3}
m_PrefabInstance: {fileID: 6268679642209076924}
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!114 &2120445622 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1536012154932022711, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
m_PrefabInstance: {fileID: 2673299386314699482}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e45cfe2f36eb4f589b6d8f331567974d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &481559811017721991
PrefabInstance:
m_ObjectHideFlags: 0
@ -1498,155 +1479,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
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: 1
objectReference: {fileID: 0}
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 80
objectReference: {fileID: 0}
- target: {fileID: 524436111069263832, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -75
objectReference: {fileID: 0}
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 80
objectReference: {fileID: 0}
- target: {fileID: 965650796640655482, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -15
objectReference: {fileID: 0}
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.x
value: 80
objectReference: {fileID: 0}
- target: {fileID: 3066961863796270965, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -45
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: 0
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: 160
objectReference: {fileID: 0}
- target: {fileID: 8974533068185241455, guid: 6a6b87c10209f534b926ee730079390c, type: 3}
propertyPath: m_SizeDelta.y
value: 90
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
PrefabInstance:
m_ObjectHideFlags: 0
@ -2014,4 +1846,4 @@ SceneRoots:
- {fileID: 164739122}
- {fileID: 1423222968}
- {fileID: 111982858}
- {fileID: 143894352}
- {fileID: 904176941}

View File

@ -119,6 +119,275 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &194192102
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 194192103}
- component: {fileID: 194192105}
- component: {fileID: 194192104}
m_Layer: 5
m_Name: background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &194192103
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194192102}
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: 1344781620}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &194192104
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194192102}
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: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fd2240c14a14543489a97ecc3b5c0853, type: 3}
m_Type: 0
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!222 &194192105
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 194192102}
m_CullTransparentMesh: 1
--- !u!1 &336157944
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 336157946}
- component: {fileID: 336157945}
m_Layer: 0
m_Name: UIControl
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &336157945
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 336157944}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 66ec6c65c80a43e799c1cb67fc9f7691, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
--- !u!4 &336157946
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 336157944}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1239.7881, y: 464.41284, 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!1001 &360627886
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 668892717}
m_Modifications:
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2054715303808414256, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2054715303808414256, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2054715303808414256, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.x
value: 399.99997
objectReference: {fileID: 0}
- target: {fileID: 2054715303808414256, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.y
value: -184.99998
objectReference: {fileID: 0}
- target: {fileID: 3530227357112532485, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_Name
value: EscUI
objectReference: {fileID: 0}
- target: {fileID: 3530227357112532485, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5084767838786362069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5084767838786362069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5084767838786362069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.x
value: 399.99997
objectReference: {fileID: 0}
- target: {fileID: 5084767838786362069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.y
value: -224.99998
objectReference: {fileID: 0}
- target: {fileID: 5683899746708222069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5683899746708222069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5683899746708222069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.x
value: 399.99997
objectReference: {fileID: 0}
- target: {fileID: 5683899746708222069, guid: 97884168f61531647ba02870b2e2160f, type: 3}
propertyPath: m_AnchoredPosition.y
value: -265
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 97884168f61531647ba02870b2e2160f, type: 3}
--- !u!1 &400281624
GameObject:
m_ObjectHideFlags: 0
@ -224,17 +493,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 521385224}
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_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 668892717}
m_Father: {fileID: 1989361080}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: 1820, y: 980}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &521385226
MonoBehaviour:
@ -295,6 +564,51 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 521385224}
m_CullTransparentMesh: 1
--- !u!1 &597126021
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 597126023}
- component: {fileID: 597126022}
m_Layer: 0
m_Name: Clock
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &597126022
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 597126021}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cd0367766d04d8c4db80bcfe0202e619, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
--- !u!4 &597126023
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 597126021}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1239.7881, y: 464.41284, 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 &668892713
GameObject:
m_ObjectHideFlags: 0
@ -343,7 +657,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
@ -389,8 +703,9 @@ RectTransform:
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 521385225}
- {fileID: 1145531078}
- {fileID: 1344781620}
- {fileID: 1989361080}
- {fileID: 863426610}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@ -398,6 +713,11 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!224 &863426610 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1633840166558733415, guid: 97884168f61531647ba02870b2e2160f, type: 3}
m_PrefabInstance: {fileID: 360627886}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1145531077
GameObject:
m_ObjectHideFlags: 0
@ -423,17 +743,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1145531077}
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_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 668892717}
m_Father: {fileID: 1989361080}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 50}
m_SizeDelta: {x: 1820, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1145531079
MonoBehaviour:
@ -671,6 +991,78 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1344781619
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1344781620}
m_Layer: 5
m_Name: MainMenu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1344781620
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1344781619}
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: 194192103}
- {fileID: 1482151278}
m_Father: {fileID: 668892717}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1482151277
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1482151278}
m_Layer: 5
m_Name: Button
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1482151278
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1482151277}
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: 1344781620}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1848984427
GameObject:
m_ObjectHideFlags: 0
@ -715,8 +1107,97 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1966ff90f1854aee9ca89d700abef90d, type: 3}
m_Name:
m_EditorClassIdentifier:
loadingUI: {fileID: 1989361079}
progressBar: {fileID: 521385226}
describeText: {fileID: 1145531079}
duration: 1
fadeDuration: 1
--- !u!1 &1989361079
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1989361080}
m_Layer: 5
m_Name: Loading
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &1989361080
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1989361079}
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: 521385225}
- {fileID: 1145531078}
m_Father: {fileID: 668892717}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2131333542
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2131333544}
- component: {fileID: 2131333543}
m_Layer: 0
m_Name: EntityManage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2131333543
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2131333542}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aa378b7511b04429b8b6b0efbcce825a, type: 3}
m_Name:
m_EditorClassIdentifier:
isGlobal: 1
characterPrefab: {fileID: 3420474218334607780, guid: 5218adfb8e855a9459df63de8b2f323c, type: 3}
buildingPrefab: {fileID: 5615006624229444611, guid: d7b9277d8e6ac4541800044bdb0da063, type: 3}
bulletPrefab: {fileID: 8687677644466399534, guid: 29b2450a8636a104586e36333878f4d9, type: 3}
defaultEntityPrefab: {fileID: 7975757421877276383, guid: 89661daa5f100c64783f0ad9cd37a7ff, type: 3}
--- !u!4 &2131333544
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2131333542}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 793.48004, y: 503.31778, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
@ -725,3 +1206,6 @@ SceneRoots:
- {fileID: 668892717}
- {fileID: 400281627}
- {fileID: 1848984428}
- {fileID: 2131333544}
- {fileID: 336157946}
- {fileID: 597126023}

View File

@ -5,21 +5,27 @@ 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 float duration = 0.5f; // 过渡时间
private Color textColor;
private string[] _loadingSteps =
private readonly string[] _loadingSteps =
{
"初始化日志", "正在载入定义", "正在加载图片资源", "正在切割瓦片", "正在加载区分派系",
"正在加载物品"
};
public float progress
public float Progress
{
set
{
@ -33,12 +39,32 @@ namespace Base
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());
}
@ -81,7 +107,10 @@ namespace Base
// 加载完成后的处理
describeText.text = "加载完成!";
progress = 1f;
Progress = 1f;
// 开始渐隐效果
yield return FadeOutProgressBar();
}
private IEnumerator SmoothTransitionTo(float targetProgress)
@ -93,12 +122,29 @@ namespace Base
{
elapsedTime += Time.deltaTime;
var t = Mathf.SmoothStep(0f, 1f, elapsedTime / duration); // 使用 SmoothStep 实现平滑过渡
progress = Mathf.Lerp(startProgress, targetProgress, t);
Progress = Mathf.Lerp(startProgress, targetProgress, t);
yield return null;
}
// 确保最终进度达到目标值
progress = targetProgress;
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);
}
}
}

View File

@ -1,42 +0,0 @@
using System.Collections.Generic;
using Prefab;
using UnityEngine;
using UnityEngine.Events;
namespace Base
{
public class RightMenu : Utils.MonoSingleton<RightMenu>
{
public RightMenuPrefab rightMenuPrefab;
public Vector3 Position
{
set
{
rightMenuPrefab.transform.position = value;
}
get
{
return rightMenuPrefab.transform.position;
}
}
public void Show()
{
rightMenuPrefab.Show();
}
public void Hide()
{
rightMenuPrefab.Hide();
}
public void Init(List<(string name, UnityAction callback)> buttons)
{
rightMenuPrefab.Init(buttons);
}
protected override void OnStart()
{
Hide();
}
}
}

View File

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 7f6fd5ff82ab4ce4aae8dd41118277f8

View 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;
}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9eb8b1554550478c85cc87558920ec6b
timeCreated: 1755524879

View File

@ -1,10 +1,16 @@
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);
@ -14,24 +20,47 @@ namespace Entity
protected override void AutoBehave()
{
TryMove();
lifeTime-=Time.deltaTime;
if (lifeTime <= 0)
{
Kill();
}
}
private void OnTriggerEnter2D(Collider2D other)
{
other.GetComponent<Entity>()?.OnHit(this);
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)
{
// 默认向上方向
Vector3 upDirection = Vector3.up;
// 确保目标方向不是零向量
if (targetDirection == Vector3.zero)
return;
// 计算旋转角度
float angle = Mathf.Atan2(targetDirection.x, targetDirection.y) * Mathf.Rad2Deg;
// 计算当前向上方向与目标方向之间的角度
float angle = Mathf.Atan2(targetDirection.y, targetDirection.x) * Mathf.Rad2Deg;
// 设置旋转
transform.rotation = Quaternion.Euler(0, 0, angle);
// 调整角度因为默认贴图向上是0度而Atan2计算的是相对于x轴的角度
angle -= 90f;
// 应用旋转
transform.rotation = Quaternion.Euler(0f, 0f, angle);
}
}
}

View File

@ -32,7 +32,7 @@ namespace Entity
var buttonDef = def.Values.First();
Vector3 dir = Utils.MousePosition.GetWorldPosition();
Managers.EntityManage.Instance.GenerateBulletEntity((BulletDef)buttonDef, Position,
dir - Position);
dir - Position, this);
}
}
}

View File

@ -149,7 +149,7 @@ namespace Entity
{
attributes = entityDef.attributes.Clone();
aiTree = Utils.BehaviorTree.ConvertToAIBase(entityDef.behaviorTree);
affiliation = entityDef.affiliation.defName;
affiliation = entityDef.affiliation?.defName;
InitBody(entityDef.drawingOrder);
this.entityDef = entityDef;

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using Managers;
using Prefab;
using UnityEngine;
using UnityEngine.Events;
@ -7,6 +8,8 @@ namespace Entity
{
public class Outline : MonoBehaviour
{
public RightMenuPrefab rightMenuPrefab;
public GameObject body;
public SpriteRenderer outlineRenderer;
public CapsuleCollider2D outlineCollider;
@ -96,10 +99,7 @@ namespace Entity
// 检测是否按下的是鼠标右键
if (Input.GetMouseButtonDown(1)) // 鼠标右键对应的是按钮索引 1
{
var rightMenu = Base.RightMenu.Instance;
rightMenu.Init(GetMenu());
rightMenu.Position = Input.mousePosition;
rightMenu.Show();
RightMenuManager.GenerateRightMenu(GetMenu(), Input.mousePosition);
}
}

View File

@ -26,7 +26,14 @@ namespace Managers
{
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)
{
// 如果查询的是同一个派系,默认是友好关系

View File

@ -158,20 +158,20 @@ namespace Managers
{
if (defRef.Item1 == null)
{
Debug.LogError("defRef.Item1 为 null");
Debug.LogError("被引用定义为 null");
continue;
}
if (defRef.Item2 == null)
{
Debug.LogError("defRef.Item2 为 null");
Debug.LogError("被引用定义的字段引用为 null");
continue;
}
var value = FindDefine(defRef.Item3.description, defRef.Item3.defName);
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;
}

View File

@ -2,23 +2,25 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Base;
using Entity;
using Prefab;
using UnityEngine;
using UnityEngine.Serialization;
namespace Managers
{
public class EntityManage : Utils.MonoSingleton<EntityManage>, ITick
{
public Dictionary<string, LinkedList<EntityPrefab>> factionEntities = new();
public EntityPrefab entityPrefab;
public EntityPrefab characterPrefab;
public EntityPrefab buildingPrefab;
public EntityPrefab bulletPrefab;
public EntityPrefab defaultEntityPrefab;
private Dictionary<string, Transform> layerCache = new Dictionary<string, Transform>();
private List<Tuple<string, EntityPrefab>> pendingAdditions;
private List<Tuple<string, EntityPrefab>> pendingAdditions = new();
public LinkedList<EntityPrefab> FindEntitiesByFaction(string factionKey)
{
@ -158,7 +160,7 @@ namespace Managers
public void GenerateEntity(Data.EntityDef entityDef, Vector3 pos)
{
// 验证关键参数
if (!entityPrefab)
if (!characterPrefab)
{
Debug.LogError("entityPrefab is null! Assign a valid prefab.");
GenerateDefaultEntity(pos);
@ -177,7 +179,7 @@ namespace Managers
// 调用通用生成逻辑
var result = GenerateEntityInternal(
entityPrefab.gameObject,
characterPrefab.gameObject,
entityLevelTransform,
pos,
entityDef
@ -224,7 +226,8 @@ namespace Managers
/// <summary>
/// 生成子弹实体(含方向设置)
/// </summary>
public void GenerateBulletEntity(Data.BulletDef bulletDef, Vector3 pos, Vector3 dir)
public void GenerateBulletEntity(Data.BulletDef bulletDef, Vector3 pos, Vector3 dir,
Entity.Entity source = null)
{
// 修正:检查正确的预制体 (bulletPrefab)
if (!bulletPrefab)
@ -252,6 +255,11 @@ namespace Managers
// 子弹特有的方向设置
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);
}

View File

@ -346,14 +346,14 @@ namespace Managers
if (!bodyTexture.TryGetValue(packageName, out var packageDict))
{
Debug.LogWarning($"Package '{packageName}' not found.");
return Array.Empty<Sprite>();
return new[] { defaultSprite };
}
// 检查文件路径是否存在
if (!packageDict.TryGetValue(filePath, out var pathDict))
{
Debug.LogWarning($"File path '{filePath}' not found in package '{packageName}'.");
return Array.Empty<Sprite>();
return new[] { defaultSprite };
}
// 收集所有匹配的Sprite

View 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()
{
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 409b8017bbd6443eb2dde17ea6fd5e29
timeCreated: 1755526878

View File

@ -20,9 +20,14 @@ namespace Map
public bool CanPassThrough(int x, int y)
{
return GetTileCost(x, y) < 1;
return GetTilePassCost(x, y) < 1;
}
public float GetTileCost(int x, int y)
public float GetTilePassCost(int x, int y)
{
return 0;
}
public float GetTileBulletCover(int x, int y)
{
return 0;
}

View File

@ -17,7 +17,7 @@ namespace Prefab
public void Hide()
{
gameObject.SetActive(false);
Destroy(this.gameObject);
}
public void Init(List<(string name, UnityAction callback)> buttons)
@ -27,8 +27,6 @@ namespace Prefab
Debug.LogError("Menu or ButtonPrefab is not assigned!");
return;
}
ClearMenu();
foreach (var (label, callback) in buttons)
{
// 实例化按钮预制体
@ -68,14 +66,6 @@ namespace Prefab
}
}
}
public void ClearMenu()
{
// 遍历菜单下的所有子对象并销毁它们
foreach (Transform child in menu.transform)
{
Destroy(child.gameObject);
}
}
public void OnPointerExit(PointerEventData eventData)
{
Hide();

View File

@ -141,7 +141,7 @@ namespace Utils
var distance = (from.x == to.x || from.y == to.y) ? 1f : 1.4142f;
// 应用目标瓦片的速度削减率
var costModifier = Map.MapGenerator.Instance.GetTileCost(to.x, to.y);
var costModifier = Map.MapGenerator.Instance.GetTilePassCost(to.x, to.y);
// 成本 = 距离 × (1 + 速度削减率)
return distance * (1 + costModifier);