From f4cd5f4a869b64fcb05ae2c86fd9454e88f957d7 Mon Sep 17 00:00:00 2001 From: m0_75251201 Date: Tue, 19 Aug 2025 14:36:22 +0800 Subject: [PATCH] =?UTF-8?q?(client)=20feat:=E6=B7=BB=E5=8A=A0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=B1=BB=EF=BC=8C=E5=AD=90=E5=BC=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=95=8C=E6=88=91=E8=AF=86=E5=88=AB=EF=BC=9B=20chore:=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=86=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=96=B9=E5=BC=8F=E4=B8=BA=E7=8B=AC?= =?UTF-8?q?=E7=AB=8B=E5=88=9B=E5=BB=BA=EF=BC=8C=E5=8A=A0=E8=BD=BD=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8A=A5=E9=94=99=E6=8F=90=E4=BE=9B=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E5=8A=A8=E7=94=BB=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E5=87=BA=E9=94=99=E4=B9=9F=E8=BF=94=E5=9B=9E=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Client/Assets/Prefab/RightMenu.prefab | 460 ---------------- Client/Assets/Resources/Image/logo.png.meta | 16 +- Client/Assets/{ => Resources}/Prefab.meta | 0 .../{ => Resources}/Prefab/Animation.prefab | 0 .../Prefab/Animation.prefab.meta | 0 .../Prefab/ButtonTemplate.prefab | 0 .../Prefab/ButtonTemplate.prefab.meta | 0 Client/Assets/Resources/Prefab/Entity.meta | 8 + .../Entity}/BuildingPrefab Variant.prefab | 1 + .../BuildingPrefab Variant.prefab.meta | 0 .../Entity}/BulletPrefab Variant.prefab | 0 .../Entity}/BulletPrefab Variant.prefab.meta | 0 .../Entity}/CharacterPrefab Variant.prefab | 0 .../CharacterPrefab Variant.prefab.meta | 0 .../Prefab/Entity}/EntityPrefab.prefab | 1 + .../Prefab/Entity}/EntityPrefab.prefab.meta | 0 .../{ => Resources}/Prefab/Image.prefab | 0 .../{ => Resources}/Prefab/Image.prefab.meta | 0 .../{ => Resources}/Prefab/ProgressBar.prefab | 0 .../Prefab/ProgressBar.prefab.meta | 0 .../Assets/Resources/Prefab/RightMenu.prefab | 134 +++++ .../Prefab/RightMenu.prefab.meta | 0 .../Prefab/TextTemplate.prefab | 0 .../Prefab/TextTemplate.prefab.meta | 0 Client/Assets/Resources/Prefab/UI.meta | 8 + .../Prefab/UI}/DevMenu.prefab | 0 .../Prefab/UI}/DevMenu.prefab.meta | 0 .../Prefab/UI}/EntityPlacementUI.prefab | 0 .../Prefab/UI}/EntityPlacementUI.prefab.meta | 0 .../Prefab/UI}/EscUI.prefab | 0 .../Prefab/UI}/EscUI.prefab.meta | 0 .../Prefab/UI}/LogUI.prefab | 0 .../Prefab/UI}/LogUI.prefab.meta | 0 .../Prefab/UI}/Pause.prefab | 0 .../Prefab/UI}/Pause.prefab.meta | 0 Client/Assets/Scenes/Game.unity | 266 ++-------- Client/Assets/Scenes/Initiate.unity | 502 +++++++++++++++++- Client/Assets/Scripts/Base/Launcher.cs | 60 ++- Client/Assets/Scripts/Base/RightMenu.cs | 42 -- Client/Assets/Scripts/Base/RightMenu.cs.meta | 2 - Client/Assets/Scripts/Base/Setting.cs | 90 ++++ Client/Assets/Scripts/Base/Setting.cs.meta | 3 + Client/Assets/Scripts/Entity/Bullet.cs | 43 +- Client/Assets/Scripts/Entity/Character.cs | 2 +- Client/Assets/Scripts/Entity/Entity.cs | 2 +- Client/Assets/Scripts/Entity/Outline.cs | 8 +- .../Scripts/Managers/AffiliationManager.cs | 9 +- .../Assets/Scripts/Managers/DefineManager.cs | 6 +- .../Assets/Scripts/Managers/EntityManage.cs | 20 +- .../Scripts/Managers/PackagesImageManager.cs | 4 +- .../Scripts/Managers/RightMenuManager.cs | 63 +++ .../Scripts/Managers/RightMenuManager.cs.meta | 3 + Client/Assets/Scripts/Map/MapGenerator.cs | 9 +- .../Assets/Scripts/Prefab/RightMenuPrefab.cs | 12 +- Client/Assets/Scripts/Utils/Pathfinder.cs | 2 +- .../Data/Core/Define/Pawn/AffiliationDef.xml | 6 +- .../ProjectSettings/EditorBuildSettings.asset | 6 +- 57 files changed, 1000 insertions(+), 788 deletions(-) delete mode 100644 Client/Assets/Prefab/RightMenu.prefab rename Client/Assets/{ => Resources}/Prefab.meta (100%) rename Client/Assets/{ => Resources}/Prefab/Animation.prefab (100%) rename Client/Assets/{ => Resources}/Prefab/Animation.prefab.meta (100%) rename Client/Assets/{ => Resources}/Prefab/ButtonTemplate.prefab (100%) rename Client/Assets/{ => Resources}/Prefab/ButtonTemplate.prefab.meta (100%) create mode 100644 Client/Assets/Resources/Prefab/Entity.meta rename Client/Assets/{Prefab => Resources/Prefab/Entity}/BuildingPrefab Variant.prefab (98%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/BuildingPrefab Variant.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/BulletPrefab Variant.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/BulletPrefab Variant.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/CharacterPrefab Variant.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/CharacterPrefab Variant.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/EntityPrefab.prefab (99%) rename Client/Assets/{Prefab => Resources/Prefab/Entity}/EntityPrefab.prefab.meta (100%) rename Client/Assets/{ => Resources}/Prefab/Image.prefab (100%) rename Client/Assets/{ => Resources}/Prefab/Image.prefab.meta (100%) rename Client/Assets/{ => Resources}/Prefab/ProgressBar.prefab (100%) rename Client/Assets/{ => Resources}/Prefab/ProgressBar.prefab.meta (100%) create mode 100644 Client/Assets/Resources/Prefab/RightMenu.prefab rename Client/Assets/{ => Resources}/Prefab/RightMenu.prefab.meta (100%) rename Client/Assets/{ => Resources}/Prefab/TextTemplate.prefab (100%) rename Client/Assets/{ => Resources}/Prefab/TextTemplate.prefab.meta (100%) create mode 100644 Client/Assets/Resources/Prefab/UI.meta rename Client/Assets/{Prefab => Resources/Prefab/UI}/DevMenu.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/DevMenu.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/EntityPlacementUI.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/EntityPlacementUI.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/EscUI.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/EscUI.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/LogUI.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/LogUI.prefab.meta (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/Pause.prefab (100%) rename Client/Assets/{Prefab => Resources/Prefab/UI}/Pause.prefab.meta (100%) delete mode 100644 Client/Assets/Scripts/Base/RightMenu.cs delete mode 100644 Client/Assets/Scripts/Base/RightMenu.cs.meta create mode 100644 Client/Assets/Scripts/Base/Setting.cs create mode 100644 Client/Assets/Scripts/Base/Setting.cs.meta create mode 100644 Client/Assets/Scripts/Managers/RightMenuManager.cs create mode 100644 Client/Assets/Scripts/Managers/RightMenuManager.cs.meta diff --git a/Client/Assets/Prefab/RightMenu.prefab b/Client/Assets/Prefab/RightMenu.prefab deleted file mode 100644 index 0fce0dd..0000000 --- a/Client/Assets/Prefab/RightMenu.prefab +++ /dev/null @@ -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} diff --git a/Client/Assets/Resources/Image/logo.png.meta b/Client/Assets/Resources/Image/logo.png.meta index 62a477d..910435a 100644 --- a/Client/Assets/Resources/Image/logo.png.meta +++ b/Client/Assets/Resources/Image/logo.png.meta @@ -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: diff --git a/Client/Assets/Prefab.meta b/Client/Assets/Resources/Prefab.meta similarity index 100% rename from Client/Assets/Prefab.meta rename to Client/Assets/Resources/Prefab.meta diff --git a/Client/Assets/Prefab/Animation.prefab b/Client/Assets/Resources/Prefab/Animation.prefab similarity index 100% rename from Client/Assets/Prefab/Animation.prefab rename to Client/Assets/Resources/Prefab/Animation.prefab diff --git a/Client/Assets/Prefab/Animation.prefab.meta b/Client/Assets/Resources/Prefab/Animation.prefab.meta similarity index 100% rename from Client/Assets/Prefab/Animation.prefab.meta rename to Client/Assets/Resources/Prefab/Animation.prefab.meta diff --git a/Client/Assets/Prefab/ButtonTemplate.prefab b/Client/Assets/Resources/Prefab/ButtonTemplate.prefab similarity index 100% rename from Client/Assets/Prefab/ButtonTemplate.prefab rename to Client/Assets/Resources/Prefab/ButtonTemplate.prefab diff --git a/Client/Assets/Prefab/ButtonTemplate.prefab.meta b/Client/Assets/Resources/Prefab/ButtonTemplate.prefab.meta similarity index 100% rename from Client/Assets/Prefab/ButtonTemplate.prefab.meta rename to Client/Assets/Resources/Prefab/ButtonTemplate.prefab.meta diff --git a/Client/Assets/Resources/Prefab/Entity.meta b/Client/Assets/Resources/Prefab/Entity.meta new file mode 100644 index 0000000..a8a4e0b --- /dev/null +++ b/Client/Assets/Resources/Prefab/Entity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21b4b583171568b45a10dbc2e1fdab10 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Prefab/BuildingPrefab Variant.prefab b/Client/Assets/Resources/Prefab/Entity/BuildingPrefab Variant.prefab similarity index 98% rename from Client/Assets/Prefab/BuildingPrefab Variant.prefab rename to Client/Assets/Resources/Prefab/Entity/BuildingPrefab Variant.prefab index 0a94705..066190d 100644 --- a/Client/Assets/Prefab/BuildingPrefab Variant.prefab +++ b/Client/Assets/Resources/Prefab/Entity/BuildingPrefab Variant.prefab @@ -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} diff --git a/Client/Assets/Prefab/BuildingPrefab Variant.prefab.meta b/Client/Assets/Resources/Prefab/Entity/BuildingPrefab Variant.prefab.meta similarity index 100% rename from Client/Assets/Prefab/BuildingPrefab Variant.prefab.meta rename to Client/Assets/Resources/Prefab/Entity/BuildingPrefab Variant.prefab.meta diff --git a/Client/Assets/Prefab/BulletPrefab Variant.prefab b/Client/Assets/Resources/Prefab/Entity/BulletPrefab Variant.prefab similarity index 100% rename from Client/Assets/Prefab/BulletPrefab Variant.prefab rename to Client/Assets/Resources/Prefab/Entity/BulletPrefab Variant.prefab diff --git a/Client/Assets/Prefab/BulletPrefab Variant.prefab.meta b/Client/Assets/Resources/Prefab/Entity/BulletPrefab Variant.prefab.meta similarity index 100% rename from Client/Assets/Prefab/BulletPrefab Variant.prefab.meta rename to Client/Assets/Resources/Prefab/Entity/BulletPrefab Variant.prefab.meta diff --git a/Client/Assets/Prefab/CharacterPrefab Variant.prefab b/Client/Assets/Resources/Prefab/Entity/CharacterPrefab Variant.prefab similarity index 100% rename from Client/Assets/Prefab/CharacterPrefab Variant.prefab rename to Client/Assets/Resources/Prefab/Entity/CharacterPrefab Variant.prefab diff --git a/Client/Assets/Prefab/CharacterPrefab Variant.prefab.meta b/Client/Assets/Resources/Prefab/Entity/CharacterPrefab Variant.prefab.meta similarity index 100% rename from Client/Assets/Prefab/CharacterPrefab Variant.prefab.meta rename to Client/Assets/Resources/Prefab/Entity/CharacterPrefab Variant.prefab.meta diff --git a/Client/Assets/Prefab/EntityPrefab.prefab b/Client/Assets/Resources/Prefab/Entity/EntityPrefab.prefab similarity index 99% rename from Client/Assets/Prefab/EntityPrefab.prefab rename to Client/Assets/Resources/Prefab/Entity/EntityPrefab.prefab index 7ffbbf0..956f38f 100644 --- a/Client/Assets/Prefab/EntityPrefab.prefab +++ b/Client/Assets/Resources/Prefab/Entity/EntityPrefab.prefab @@ -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} diff --git a/Client/Assets/Prefab/EntityPrefab.prefab.meta b/Client/Assets/Resources/Prefab/Entity/EntityPrefab.prefab.meta similarity index 100% rename from Client/Assets/Prefab/EntityPrefab.prefab.meta rename to Client/Assets/Resources/Prefab/Entity/EntityPrefab.prefab.meta diff --git a/Client/Assets/Prefab/Image.prefab b/Client/Assets/Resources/Prefab/Image.prefab similarity index 100% rename from Client/Assets/Prefab/Image.prefab rename to Client/Assets/Resources/Prefab/Image.prefab diff --git a/Client/Assets/Prefab/Image.prefab.meta b/Client/Assets/Resources/Prefab/Image.prefab.meta similarity index 100% rename from Client/Assets/Prefab/Image.prefab.meta rename to Client/Assets/Resources/Prefab/Image.prefab.meta diff --git a/Client/Assets/Prefab/ProgressBar.prefab b/Client/Assets/Resources/Prefab/ProgressBar.prefab similarity index 100% rename from Client/Assets/Prefab/ProgressBar.prefab rename to Client/Assets/Resources/Prefab/ProgressBar.prefab diff --git a/Client/Assets/Prefab/ProgressBar.prefab.meta b/Client/Assets/Resources/Prefab/ProgressBar.prefab.meta similarity index 100% rename from Client/Assets/Prefab/ProgressBar.prefab.meta rename to Client/Assets/Resources/Prefab/ProgressBar.prefab.meta diff --git a/Client/Assets/Resources/Prefab/RightMenu.prefab b/Client/Assets/Resources/Prefab/RightMenu.prefab new file mode 100644 index 0000000..7e343f7 --- /dev/null +++ b/Client/Assets/Resources/Prefab/RightMenu.prefab @@ -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} diff --git a/Client/Assets/Prefab/RightMenu.prefab.meta b/Client/Assets/Resources/Prefab/RightMenu.prefab.meta similarity index 100% rename from Client/Assets/Prefab/RightMenu.prefab.meta rename to Client/Assets/Resources/Prefab/RightMenu.prefab.meta diff --git a/Client/Assets/Prefab/TextTemplate.prefab b/Client/Assets/Resources/Prefab/TextTemplate.prefab similarity index 100% rename from Client/Assets/Prefab/TextTemplate.prefab rename to Client/Assets/Resources/Prefab/TextTemplate.prefab diff --git a/Client/Assets/Prefab/TextTemplate.prefab.meta b/Client/Assets/Resources/Prefab/TextTemplate.prefab.meta similarity index 100% rename from Client/Assets/Prefab/TextTemplate.prefab.meta rename to Client/Assets/Resources/Prefab/TextTemplate.prefab.meta diff --git a/Client/Assets/Resources/Prefab/UI.meta b/Client/Assets/Resources/Prefab/UI.meta new file mode 100644 index 0000000..73c1a0d --- /dev/null +++ b/Client/Assets/Resources/Prefab/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ceedab54889f704fb47118b2aee7ada +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Client/Assets/Prefab/DevMenu.prefab b/Client/Assets/Resources/Prefab/UI/DevMenu.prefab similarity index 100% rename from Client/Assets/Prefab/DevMenu.prefab rename to Client/Assets/Resources/Prefab/UI/DevMenu.prefab diff --git a/Client/Assets/Prefab/DevMenu.prefab.meta b/Client/Assets/Resources/Prefab/UI/DevMenu.prefab.meta similarity index 100% rename from Client/Assets/Prefab/DevMenu.prefab.meta rename to Client/Assets/Resources/Prefab/UI/DevMenu.prefab.meta diff --git a/Client/Assets/Prefab/EntityPlacementUI.prefab b/Client/Assets/Resources/Prefab/UI/EntityPlacementUI.prefab similarity index 100% rename from Client/Assets/Prefab/EntityPlacementUI.prefab rename to Client/Assets/Resources/Prefab/UI/EntityPlacementUI.prefab diff --git a/Client/Assets/Prefab/EntityPlacementUI.prefab.meta b/Client/Assets/Resources/Prefab/UI/EntityPlacementUI.prefab.meta similarity index 100% rename from Client/Assets/Prefab/EntityPlacementUI.prefab.meta rename to Client/Assets/Resources/Prefab/UI/EntityPlacementUI.prefab.meta diff --git a/Client/Assets/Prefab/EscUI.prefab b/Client/Assets/Resources/Prefab/UI/EscUI.prefab similarity index 100% rename from Client/Assets/Prefab/EscUI.prefab rename to Client/Assets/Resources/Prefab/UI/EscUI.prefab diff --git a/Client/Assets/Prefab/EscUI.prefab.meta b/Client/Assets/Resources/Prefab/UI/EscUI.prefab.meta similarity index 100% rename from Client/Assets/Prefab/EscUI.prefab.meta rename to Client/Assets/Resources/Prefab/UI/EscUI.prefab.meta diff --git a/Client/Assets/Prefab/LogUI.prefab b/Client/Assets/Resources/Prefab/UI/LogUI.prefab similarity index 100% rename from Client/Assets/Prefab/LogUI.prefab rename to Client/Assets/Resources/Prefab/UI/LogUI.prefab diff --git a/Client/Assets/Prefab/LogUI.prefab.meta b/Client/Assets/Resources/Prefab/UI/LogUI.prefab.meta similarity index 100% rename from Client/Assets/Prefab/LogUI.prefab.meta rename to Client/Assets/Resources/Prefab/UI/LogUI.prefab.meta diff --git a/Client/Assets/Prefab/Pause.prefab b/Client/Assets/Resources/Prefab/UI/Pause.prefab similarity index 100% rename from Client/Assets/Prefab/Pause.prefab rename to Client/Assets/Resources/Prefab/UI/Pause.prefab diff --git a/Client/Assets/Prefab/Pause.prefab.meta b/Client/Assets/Resources/Prefab/UI/Pause.prefab.meta similarity index 100% rename from Client/Assets/Prefab/Pause.prefab.meta rename to Client/Assets/Resources/Prefab/UI/Pause.prefab.meta diff --git a/Client/Assets/Scenes/Game.unity b/Client/Assets/Scenes/Game.unity index 0eddb13..0337e45 100644 --- a/Client/Assets/Scenes/Game.unity +++ b/Client/Assets/Scenes/Game.unity @@ -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} diff --git a/Client/Assets/Scenes/Initiate.unity b/Client/Assets/Scenes/Initiate.unity index a80b9df..c5e45ee 100644 --- a/Client/Assets/Scenes/Initiate.unity +++ b/Client/Assets/Scenes/Initiate.unity @@ -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} diff --git a/Client/Assets/Scripts/Base/Launcher.cs b/Client/Assets/Scripts/Base/Launcher.cs index 72e177c..e291bae 100644 --- a/Client/Assets/Scripts/Base/Launcher.cs +++ b/Client/Assets/Scripts/Base/Launcher.cs @@ -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); } } } \ No newline at end of file diff --git a/Client/Assets/Scripts/Base/RightMenu.cs b/Client/Assets/Scripts/Base/RightMenu.cs deleted file mode 100644 index f972e26..0000000 --- a/Client/Assets/Scripts/Base/RightMenu.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using Prefab; -using UnityEngine; -using UnityEngine.Events; - -namespace Base -{ - public class RightMenu : Utils.MonoSingleton - { - 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(); - } - } - -} diff --git a/Client/Assets/Scripts/Base/RightMenu.cs.meta b/Client/Assets/Scripts/Base/RightMenu.cs.meta deleted file mode 100644 index 57a9322..0000000 --- a/Client/Assets/Scripts/Base/RightMenu.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 7f6fd5ff82ab4ce4aae8dd41118277f8 \ No newline at end of file diff --git a/Client/Assets/Scripts/Base/Setting.cs b/Client/Assets/Scripts/Base/Setting.cs new file mode 100644 index 0000000..d60d273 --- /dev/null +++ b/Client/Assets/Scripts/Base/Setting.cs @@ -0,0 +1,90 @@ +using Newtonsoft.Json; +using UnityEngine; + +namespace Base +{ + + + public class Setting : Utils.Singleton + { + // 游戏设置数据类(用于序列化) + [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(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; + } + } + } +} \ No newline at end of file diff --git a/Client/Assets/Scripts/Base/Setting.cs.meta b/Client/Assets/Scripts/Base/Setting.cs.meta new file mode 100644 index 0000000..088641b --- /dev/null +++ b/Client/Assets/Scripts/Base/Setting.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9eb8b1554550478c85cc87558920ec6b +timeCreated: 1755524879 \ No newline at end of file diff --git a/Client/Assets/Scripts/Entity/Bullet.cs b/Client/Assets/Scripts/Entity/Bullet.cs index c988c67..26a1c3e 100644 --- a/Client/Assets/Scripts/Entity/Bullet.cs +++ b/Client/Assets/Scripts/Entity/Bullet.cs @@ -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()?.OnHit(this); + var entity = other.GetComponent(); + 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); } } } \ No newline at end of file diff --git a/Client/Assets/Scripts/Entity/Character.cs b/Client/Assets/Scripts/Entity/Character.cs index 3f7fbaf..7136db3 100644 --- a/Client/Assets/Scripts/Entity/Character.cs +++ b/Client/Assets/Scripts/Entity/Character.cs @@ -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); } } } \ No newline at end of file diff --git a/Client/Assets/Scripts/Entity/Entity.cs b/Client/Assets/Scripts/Entity/Entity.cs index 8153f02..8af119b 100644 --- a/Client/Assets/Scripts/Entity/Entity.cs +++ b/Client/Assets/Scripts/Entity/Entity.cs @@ -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; diff --git a/Client/Assets/Scripts/Entity/Outline.cs b/Client/Assets/Scripts/Entity/Outline.cs index c9a8dda..354512b 100644 --- a/Client/Assets/Scripts/Entity/Outline.cs +++ b/Client/Assets/Scripts/Entity/Outline.cs @@ -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); } } diff --git a/Client/Assets/Scripts/Managers/AffiliationManager.cs b/Client/Assets/Scripts/Managers/AffiliationManager.cs index bf2eeee..3b7d108 100644 --- a/Client/Assets/Scripts/Managers/AffiliationManager.cs +++ b/Client/Assets/Scripts/Managers/AffiliationManager.cs @@ -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) { // 如果查询的是同一个派系,默认是友好关系 diff --git a/Client/Assets/Scripts/Managers/DefineManager.cs b/Client/Assets/Scripts/Managers/DefineManager.cs index 0b666a8..6dbf489 100644 --- a/Client/Assets/Scripts/Managers/DefineManager.cs +++ b/Client/Assets/Scripts/Managers/DefineManager.cs @@ -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; } diff --git a/Client/Assets/Scripts/Managers/EntityManage.cs b/Client/Assets/Scripts/Managers/EntityManage.cs index a9fbf14..cec1588 100644 --- a/Client/Assets/Scripts/Managers/EntityManage.cs +++ b/Client/Assets/Scripts/Managers/EntityManage.cs @@ -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, ITick { public Dictionary> factionEntities = new(); - - public EntityPrefab entityPrefab; + + public EntityPrefab characterPrefab; public EntityPrefab buildingPrefab; public EntityPrefab bulletPrefab; public EntityPrefab defaultEntityPrefab; private Dictionary layerCache = new Dictionary(); - private List> pendingAdditions; + private List> pendingAdditions = new(); public LinkedList 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 /// /// 生成子弹实体(含方向设置) /// - 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); } diff --git a/Client/Assets/Scripts/Managers/PackagesImageManager.cs b/Client/Assets/Scripts/Managers/PackagesImageManager.cs index 6509325..4be15a5 100644 --- a/Client/Assets/Scripts/Managers/PackagesImageManager.cs +++ b/Client/Assets/Scripts/Managers/PackagesImageManager.cs @@ -346,14 +346,14 @@ namespace Managers if (!bodyTexture.TryGetValue(packageName, out var packageDict)) { Debug.LogWarning($"Package '{packageName}' not found."); - return Array.Empty(); + return new[] { defaultSprite }; } // 检查文件路径是否存在 if (!packageDict.TryGetValue(filePath, out var pathDict)) { Debug.LogWarning($"File path '{filePath}' not found in package '{packageName}'."); - return Array.Empty(); + return new[] { defaultSprite }; } // 收集所有匹配的Sprite diff --git a/Client/Assets/Scripts/Managers/RightMenuManager.cs b/Client/Assets/Scripts/Managers/RightMenuManager.cs new file mode 100644 index 0000000..1faaa27 --- /dev/null +++ b/Client/Assets/Scripts/Managers/RightMenuManager.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using Prefab; +using UnityEngine; +using UnityEngine.Events; + +namespace Managers +{ + public class RightMenuManager:Utils.MonoSingleton + { + [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("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(); + rightMenu.Init(buttons); + rightMenu.transform.position = position; + rightMenu.Show(); + } + + protected override void OnStart() + { + + } + } +} \ No newline at end of file diff --git a/Client/Assets/Scripts/Managers/RightMenuManager.cs.meta b/Client/Assets/Scripts/Managers/RightMenuManager.cs.meta new file mode 100644 index 0000000..d4c10b7 --- /dev/null +++ b/Client/Assets/Scripts/Managers/RightMenuManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 409b8017bbd6443eb2dde17ea6fd5e29 +timeCreated: 1755526878 \ No newline at end of file diff --git a/Client/Assets/Scripts/Map/MapGenerator.cs b/Client/Assets/Scripts/Map/MapGenerator.cs index 354ae63..065b245 100644 --- a/Client/Assets/Scripts/Map/MapGenerator.cs +++ b/Client/Assets/Scripts/Map/MapGenerator.cs @@ -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; } diff --git a/Client/Assets/Scripts/Prefab/RightMenuPrefab.cs b/Client/Assets/Scripts/Prefab/RightMenuPrefab.cs index 779d833..85ddafa 100644 --- a/Client/Assets/Scripts/Prefab/RightMenuPrefab.cs +++ b/Client/Assets/Scripts/Prefab/RightMenuPrefab.cs @@ -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(); diff --git a/Client/Assets/Scripts/Utils/Pathfinder.cs b/Client/Assets/Scripts/Utils/Pathfinder.cs index 4ca96ba..6bd4cc3 100644 --- a/Client/Assets/Scripts/Utils/Pathfinder.cs +++ b/Client/Assets/Scripts/Utils/Pathfinder.cs @@ -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); diff --git a/Client/Data/Core/Define/Pawn/AffiliationDef.xml b/Client/Data/Core/Define/Pawn/AffiliationDef.xml index 41e2273..0eb7b73 100644 --- a/Client/Data/Core/Define/Pawn/AffiliationDef.xml +++ b/Client/Data/Core/Define/Pawn/AffiliationDef.xml @@ -1,6 +1,10 @@ - + + none + + Neutral + player diff --git a/Client/ProjectSettings/EditorBuildSettings.asset b/Client/ProjectSettings/EditorBuildSettings.asset index 0daedb7..4388493 100644 --- a/Client/ProjectSettings/EditorBuildSettings.asset +++ b/Client/ProjectSettings/EditorBuildSettings.asset @@ -6,11 +6,11 @@ EditorBuildSettings: serializedVersion: 2 m_Scenes: - enabled: 0 - path: Assets/Scenes/MainScene.unity - guid: 99c9720ab356a0642a771bea13969a05 - - enabled: 1 path: Assets/Scenes/Game.unity guid: 5995047d2fd0f65408e4a7910dca711a + - enabled: 1 + path: Assets/Scenes/Initiate.unity + guid: 843cfe07c63263c42bae7362250d568e m_configObjects: com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3} m_UseUCBPForAssetBundles: 0