From 92cca145036064200922c24ba2a8bd32dafa7a56 Mon Sep 17 00:00:00 2001 From: SepComet <202308010230@stu.csust.edu.cn> Date: Sun, 1 Mar 2026 13:15:53 +0800 Subject: [PATCH] refactor & fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 `CombatScheduler` 的职责分散到 3 个类中 - `PhaseLoopRuntime`:负责关卡各波次的调度 - `CombatLoadSession`:负责地图与 UI 等资源的加载 - `CombatEventBridge`:负责相关事件的处理 - 统一了战斗的命名为 `Combat` - 调整了各个地图的坐标,使其位于摄像头中心 - 新增了 CombatInfoForm 展示战斗内的信息 - 补充了循环执行 LevelPhase,手动结束战斗的逻辑 --- Assets/GameMain/DataTables/UIForm.txt | 15 +- .../GameMain/Entities/LevelMap/Level1.prefab | 8 +- .../GameMain/Entities/LevelMap/Level2.prefab | 6 +- .../GameMain/Entities/LevelMap/Level4.prefab | 6 +- .../CombatNode/CombatEventBridge.cs | 151 +++ .../CombatNode/CombatEventBridge.cs.meta | 11 + .../CombatNode/CombatLoadSession.cs | 276 +++++ .../CombatNode/CombatLoadSession.cs.meta | 11 + .../CombatNode/CombatNodeComponent.cs | 52 +- .../CombatNode/CombatScheduler.cs | 327 ++---- .../CombatNode/PhaseLoopRuntime.cs | 144 +++ .../CombatNode/PhaseLoopRuntime.cs.meta | 11 + .../Scripts/Definition/Enum/UIFormType.cs | 17 +- Assets/GameMain/Scripts/Event/Combat.meta | 8 + .../Event/Combat/CombatEndEventArgs.cs | 25 + .../Event/Combat/CombatEndEventArgs.cs.meta | 3 + .../Event/Combat/CombatPauseEventArgs.cs | 21 + .../Event/Combat/CombatPauseEventArgs.cs.meta | 11 + Assets/GameMain/Scripts/UI/Combat.meta | 8 + .../GameMain/Scripts/UI/Combat/Context.meta | 8 + .../Combat/Context/CombatInfoFormContext.cs | 11 + .../Context/CombatInfoFormContext.cs.meta | 11 + .../Scripts/UI/Combat/Controller.meta | 8 + .../Controller/CombatInfoFormController.cs | 151 +++ .../CombatInfoFormController.cs.meta | 11 + .../GameMain/Scripts/UI/Combat/RawData.meta | 8 + .../Combat/RawData/CombatInfoFormRawData.cs | 15 + .../RawData/CombatInfoFormRawData.cs.meta | 11 + .../GameMain/Scripts/UI/Combat/UseCase.meta | 8 + .../Combat/UseCase/CombatInfoFormUseCase.cs | 50 + .../UseCase/CombatInfoFormUseCase.cs.meta | 11 + Assets/GameMain/Scripts/UI/Combat/View.meta | 8 + .../Scripts/UI/Combat/View/CombatInfoForm.cs | 107 ++ .../UI/Combat/View/CombatInfoForm.cs.meta | 11 + .../Scripts/UI/{GameScene.meta => Game.meta} | 0 .../UI/{GameScene => Game}/Context.meta | 0 .../Context/CombineAreaContext.cs | 0 .../Context/CombineAreaContext.cs.meta | 0 .../Context/CompAreaContext.cs | 0 .../Context/CompAreaContext.cs.meta | 0 .../Context/EventFormContext.cs | 0 .../Context/EventFormContext.cs.meta | 0 .../Context/EventOptionItemContext.cs | 0 .../Context/EventOptionItemContext.cs.meta | 0 .../Context/MainFormContext.cs | 0 .../Context/MainFormContext.cs.meta | 0 .../Context/RepoFormContext.cs | 0 .../Context/RepoFormContext.cs.meta | 0 .../Context/RepoItemContext.cs | 0 .../Context/RepoItemContext.cs.meta | 0 .../UI/{GameScene => Game}/Controller.meta | 0 .../Controller/EventFormController.cs | 0 .../Controller/EventFormController.cs.meta | 0 .../Controller/MainFormController.cs | 0 .../Controller/MainFormController.cs.meta | 0 .../Controller/RepoFormController.cs | 0 .../Controller/RepoFormController.cs.meta | 0 .../UI/{GameScene => Game}/RawData.meta | 0 .../RawData/EventFormRawData.cs | 0 .../RawData/EventFormRawData.cs.meta | 0 .../RawData/RepoFormRawData.cs | 0 .../RawData/RepoFormRawData.cs.meta | 0 .../UI/{GameScene => Game}/UseCase.meta | 0 .../UseCase/EventFormUseCase.cs | 0 .../UseCase/EventFormUseCase.cs.meta | 0 .../UseCase/RepoFormUseCase.cs | 0 .../UseCase/RepoFormUseCase.cs.meta | 0 .../Scripts/UI/{GameScene => Game}/View.meta | 0 .../{GameScene => Game}/View/CombineArea.cs | 0 .../View/CombineArea.cs.meta | 0 .../View/CombineSlotItem.cs | 0 .../View/CombineSlotItem.cs.meta | 0 .../UI/{GameScene => Game}/View/CompArea.cs | 0 .../{GameScene => Game}/View/CompArea.cs.meta | 0 .../UI/{GameScene => Game}/View/EventForm.cs | 0 .../View/EventForm.cs.meta | 0 .../View/EventOptionItem.cs | 0 .../View/EventOptionItem.cs.meta | 0 .../UI/{GameScene => Game}/View/MainForm.cs | 0 .../{GameScene => Game}/View/MainForm.cs.meta | 0 .../UI/{GameScene => Game}/View/RepoForm.cs | 0 .../{GameScene => Game}/View/RepoForm.cs.meta | 0 .../UI/{GameScene => Game}/View/RepoItem.cs | 0 .../{GameScene => Game}/View/RepoItem.cs.meta | 0 .../Scripts/UI/{MenuScene.meta => Menu.meta} | 0 .../UI/{MenuScene => Menu}/Context.meta | 0 .../Context/TestMenuFormContext.cs | 0 .../Context/TestMenuFormContext.cs.meta | 0 .../UI/{MenuScene => Menu}/Controller.meta | 0 .../Controller/TestMenuFormController.cs | 0 .../Controller/TestMenuFormController.cs.meta | 0 .../UI/{MenuScene => Menu}/RawData.meta | 0 .../UI/{MenuScene => Menu}/UseCase.meta | 0 .../Scripts/UI/{MenuScene => Menu}/View.meta | 0 .../{MenuScene => Menu}/View/TestMenuForm.cs | 0 .../View/TestMenuForm.cs.meta | 0 .../GameMain/UI/UIForms/CombatInfoForm.prefab | 983 ++++++++++++++++++ .../UI/UIForms/CombatInfoForm.prefab.meta | 7 + Assets/Launcher.unity | 131 ++- 99 files changed, 2418 insertions(+), 243 deletions(-) create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs.meta create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs.meta create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs create mode 100644 Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs.meta create mode 100644 Assets/GameMain/Scripts/Event/Combat.meta create mode 100644 Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs create mode 100644 Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs.meta create mode 100644 Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs create mode 100644 Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/Context.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs create mode 100644 Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/Controller.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs create mode 100644 Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/RawData.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs create mode 100644 Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/UseCase.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs create mode 100644 Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/View.meta create mode 100644 Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs create mode 100644 Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs.meta rename Assets/GameMain/Scripts/UI/{GameScene.meta => Game.meta} (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/CombineAreaContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/CombineAreaContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/CompAreaContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/CompAreaContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/EventFormContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/EventFormContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/EventOptionItemContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/EventOptionItemContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/MainFormContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/MainFormContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/RepoFormContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/RepoFormContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/RepoItemContext.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Context/RepoItemContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/EventFormController.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/EventFormController.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/MainFormController.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/MainFormController.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/RepoFormController.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/Controller/RepoFormController.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/RawData.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/RawData/EventFormRawData.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/RawData/EventFormRawData.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/RawData/RepoFormRawData.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/RawData/RepoFormRawData.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/UseCase.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/UseCase/EventFormUseCase.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/UseCase/EventFormUseCase.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/UseCase/RepoFormUseCase.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/UseCase/RepoFormUseCase.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CombineArea.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CombineArea.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CombineSlotItem.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CombineSlotItem.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CompArea.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/CompArea.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/EventForm.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/EventForm.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/EventOptionItem.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/EventOptionItem.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/MainForm.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/MainForm.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/RepoForm.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/RepoForm.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/RepoItem.cs (100%) rename Assets/GameMain/Scripts/UI/{GameScene => Game}/View/RepoItem.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene.meta => Menu.meta} (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Context.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Context/TestMenuFormContext.cs (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Context/TestMenuFormContext.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Controller.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Controller/TestMenuFormController.cs (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/Controller/TestMenuFormController.cs.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/RawData.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/UseCase.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/View.meta (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/View/TestMenuForm.cs (100%) rename Assets/GameMain/Scripts/UI/{MenuScene => Menu}/View/TestMenuForm.cs.meta (100%) create mode 100644 Assets/GameMain/UI/UIForms/CombatInfoForm.prefab create mode 100644 Assets/GameMain/UI/UIForms/CombatInfoForm.prefab.meta diff --git a/Assets/GameMain/DataTables/UIForm.txt b/Assets/GameMain/DataTables/UIForm.txt index 139fbb9..969a0ab 100644 --- a/Assets/GameMain/DataTables/UIForm.txt +++ b/Assets/GameMain/DataTables/UIForm.txt @@ -1,12 +1,15 @@ -# 界面配置表 -# Id AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm +# Id 列1 AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm # int string string bool bool # 界面编号 策划备注 资源名称 界面组名称 是否允许多个界面实例 是否暂停被其覆盖的界面 1 弹出框 DialogForm Default True True 100 主菜单 MenuForm Default False True 101 设置 SettingForm Default False True 102 关于 AboutForm Default False True - 103 主UI MainForm Default False True - 150 测试UI TestMenuForm Test False False - 200 事件UI EventForm Default False False - 201 背包UI RepoForm Default False True + 110 主界面 MainForm Default False True + 111 仓库UI RepoForm Default False True + 112 详细信息 ItemDescForm Default True False + 130 事件UI EventForm Default False False + 140 战斗信息UI CombatInfoForm Default False False + 141 战斗结束UI CombatFinishForm Default False True + 150 商店UI ShopForm Default False True + 200 测试UI TestMenuForm Test False False diff --git a/Assets/GameMain/Entities/LevelMap/Level1.prefab b/Assets/GameMain/Entities/LevelMap/Level1.prefab index c1d7764..b46c4c6 100644 --- a/Assets/GameMain/Entities/LevelMap/Level1.prefab +++ b/Assets/GameMain/Entities/LevelMap/Level1.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 1325870359890317289} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -105,7 +105,7 @@ Transform: m_GameObject: {fileID: 2962289204749518122} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 5, y: 9.5, z: 0} + m_LocalPosition: {x: 5, y: 8.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -440,7 +440,7 @@ Transform: m_GameObject: {fileID: 5874496972475648771} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 17.5, y: -2, z: 0} + m_LocalPosition: {x: 17.5, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -7303,7 +7303,7 @@ Transform: m_GameObject: {fileID: 7352662299735011191} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -17, y: -2, z: 0} + m_LocalPosition: {x: -17, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/GameMain/Entities/LevelMap/Level2.prefab b/Assets/GameMain/Entities/LevelMap/Level2.prefab index ae9a75d..8a525c8 100644 --- a/Assets/GameMain/Entities/LevelMap/Level2.prefab +++ b/Assets/GameMain/Entities/LevelMap/Level2.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 1325870359890317289} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -105,7 +105,7 @@ Transform: m_GameObject: {fileID: 2962289204749518122} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 5, y: 9.5, z: 0} + m_LocalPosition: {x: 5, y: 8.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -7203,7 +7203,7 @@ Transform: m_GameObject: {fileID: 7352662299735011191} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -17, y: -2, z: 0} + m_LocalPosition: {x: -17, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/GameMain/Entities/LevelMap/Level4.prefab b/Assets/GameMain/Entities/LevelMap/Level4.prefab index aba1657..3531f40 100644 --- a/Assets/GameMain/Entities/LevelMap/Level4.prefab +++ b/Assets/GameMain/Entities/LevelMap/Level4.prefab @@ -26,7 +26,7 @@ Transform: m_GameObject: {fileID: 1325870359890317289} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: -1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -105,7 +105,7 @@ Transform: m_GameObject: {fileID: 2962289204749518122} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 5, y: -7.5, z: 0} + m_LocalPosition: {x: 5, y: -8.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -7183,7 +7183,7 @@ Transform: m_GameObject: {fileID: 7352662299735011191} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -17, y: -2, z: 0} + m_LocalPosition: {x: -17, y: -3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs new file mode 100644 index 0000000..6ec91d0 --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs @@ -0,0 +1,151 @@ +using System; +using GameFramework.Event; +using UnityGameFramework.Runtime; + +namespace GeometryTD.CustomComponent +{ + internal sealed class CombatEventBridge + { + private Action _onShowEntitySuccess; + private Action _onShowEntityFailure; + private Action _onHideEntityComplete; + private Action _onOpenUIFormSuccess; + private Action _onOpenUIFormFailure; + private Action _onCloseUIFormComplete; + + private bool _isEntityEventSubscribed; + private bool _isUIEventSubscribed; + + public void Bind( + Action onShowEntitySuccess, + Action onShowEntityFailure, + Action onHideEntityComplete, + Action onOpenUIFormSuccess, + Action onOpenUIFormFailure, + Action onCloseUIFormComplete) + { + _onShowEntitySuccess = onShowEntitySuccess; + _onShowEntityFailure = onShowEntityFailure; + _onHideEntityComplete = onHideEntityComplete; + _onOpenUIFormSuccess = onOpenUIFormSuccess; + _onOpenUIFormFailure = onOpenUIFormFailure; + _onCloseUIFormComplete = onCloseUIFormComplete; + + EnsureEntityEventSubscribed(); + EnsureUIEventSubscribed(); + } + + public void Unbind() + { + UnsubscribeEntityEvents(); + UnsubscribeUIEvents(); + + _onShowEntitySuccess = null; + _onShowEntityFailure = null; + _onHideEntityComplete = null; + _onOpenUIFormSuccess = null; + _onOpenUIFormFailure = null; + _onCloseUIFormComplete = null; + } + + private void EnsureEntityEventSubscribed() + { + if (_isEntityEventSubscribed) + { + return; + } + + GameEntry.Event.Subscribe(ShowEntitySuccessEventArgs.EventId, OnShowEntitySuccess); + GameEntry.Event.Subscribe(ShowEntityFailureEventArgs.EventId, OnShowEntityFailure); + GameEntry.Event.Subscribe(HideEntityCompleteEventArgs.EventId, OnHideEntityComplete); + _isEntityEventSubscribed = true; + } + + private void EnsureUIEventSubscribed() + { + if (_isUIEventSubscribed) + { + return; + } + + GameEntry.Event.Subscribe(OpenUIFormSuccessEventArgs.EventId, OnOpenUIFormSuccess); + GameEntry.Event.Subscribe(OpenUIFormFailureEventArgs.EventId, OnOpenUIFormFailure); + GameEntry.Event.Subscribe(CloseUIFormCompleteEventArgs.EventId, OnCloseUIFormComplete); + _isUIEventSubscribed = true; + } + + private void UnsubscribeEntityEvents() + { + if (!_isEntityEventSubscribed) + { + return; + } + + GameEntry.Event.Unsubscribe(ShowEntitySuccessEventArgs.EventId, OnShowEntitySuccess); + GameEntry.Event.Unsubscribe(ShowEntityFailureEventArgs.EventId, OnShowEntityFailure); + GameEntry.Event.Unsubscribe(HideEntityCompleteEventArgs.EventId, OnHideEntityComplete); + _isEntityEventSubscribed = false; + } + + private void UnsubscribeUIEvents() + { + if (!_isUIEventSubscribed) + { + return; + } + + GameEntry.Event.Unsubscribe(OpenUIFormSuccessEventArgs.EventId, OnOpenUIFormSuccess); + GameEntry.Event.Unsubscribe(OpenUIFormFailureEventArgs.EventId, OnOpenUIFormFailure); + GameEntry.Event.Unsubscribe(CloseUIFormCompleteEventArgs.EventId, OnCloseUIFormComplete); + _isUIEventSubscribed = false; + } + + private void OnShowEntitySuccess(object sender, GameEventArgs e) + { + if (e is ShowEntitySuccessEventArgs args) + { + _onShowEntitySuccess?.Invoke(args); + } + } + + private void OnShowEntityFailure(object sender, GameEventArgs e) + { + if (e is ShowEntityFailureEventArgs args) + { + _onShowEntityFailure?.Invoke(args); + } + } + + private void OnHideEntityComplete(object sender, GameEventArgs e) + { + if (e is HideEntityCompleteEventArgs args) + { + _onHideEntityComplete?.Invoke(args); + } + } + + private void OnOpenUIFormSuccess(object sender, GameEventArgs e) + { + if (e is OpenUIFormSuccessEventArgs args) + { + _onOpenUIFormSuccess?.Invoke(args); + } + } + + private void OnOpenUIFormFailure(object sender, GameEventArgs e) + { + if (e is OpenUIFormFailureEventArgs args) + { + _onOpenUIFormFailure?.Invoke(args); + } + } + + private void OnCloseUIFormComplete(object sender, GameEventArgs e) + { + if (e is CloseUIFormCompleteEventArgs args) + { + _onCloseUIFormComplete?.Invoke(args); + } + } + } +} diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs.meta b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs.meta new file mode 100644 index 0000000..8d8f1f8 --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatEventBridge.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b8f34e0186c449fd8ff7a9d22c8aeb52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs new file mode 100644 index 0000000..6354184 --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs @@ -0,0 +1,276 @@ +using GameFramework.Resource; +using GeometryTD.CustomUtility; +using GeometryTD.DataTable; +using GeometryTD.Definition; +using GeometryTD.Entity; +using GeometryTD.Entity.EntityData; +using GeometryTD.UI; +using UnityEngine; +using UnityGameFramework.Runtime; + +namespace GeometryTD.CustomComponent +{ + internal sealed class CombatLoadSession + { + internal enum EventHandleStatus : byte + { + Ignored = 0, + Succeeded = 1, + Failed = 2 + } + + private EntityComponent _entity; + private CombatInfoFormUseCase _useCase; + private int _loadingMapEntityId; + private int _loadedMapEntityId; + private int? _loadingCombatInfoFormSerialId; + private bool _isCombatInfoFormReady; + private MapEntity _currentMap; + + public MapEntity CurrentMap => _currentMap; + public bool IsReady => _currentMap != null && _isCombatInfoFormReady; + + public void OnInit(EntityComponent entityComponent) + { + _entity = entityComponent; + Reset(); + } + + public void Reset() + { + _loadingMapEntityId = 0; + _loadedMapEntityId = 0; + _loadingCombatInfoFormSerialId = null; + _isCombatInfoFormReady = false; + _currentMap = null; + } + + public bool StartLoading(DRLevel level, out string errorMessage) + { + errorMessage = null; + if (_entity == null) + { + errorMessage = "CombatLoadSession start failed. Entity component is null."; + return false; + } + + if (!TryShowMap(level, out errorMessage)) + { + return false; + } + + if (!TryOpenCombatInfoForm(out errorMessage)) + { + return false; + } + + return true; + } + + public void RefreshCombatInfoForm(DRLevel currentLevel) + { + if (currentLevel == null) + { + return; + } + + GameEntry.UIRouter.OpenUI(UIFormType.CombatInfoForm); + } + + public void Cleanup() + { + if (_entity == null) + { + return; + } + + if (_loadingMapEntityId != 0 && _entity.IsLoadingEntity(_loadingMapEntityId)) + { + _entity.HideEntity(_loadingMapEntityId); + } + + if (_currentMap != null) + { + _entity.HideEntity(_currentMap); + } + else if (_loadedMapEntityId != 0) + { + UnityGameFramework.Runtime.Entity loadedMapEntity = _entity.GetEntity(_loadedMapEntityId); + if (loadedMapEntity != null) + { + _entity.HideEntity(loadedMapEntity); + } + } + + CloseCombatInfoForm(); + } + + public EventHandleStatus HandleShowEntitySuccess(ShowEntitySuccessEventArgs args, out string errorMessage) + { + errorMessage = null; + if (args == null) + { + return EventHandleStatus.Ignored; + } + + if (args.EntityLogicType != typeof(MapEntity) || args.Entity == null || args.Entity.Id != _loadingMapEntityId) + { + return EventHandleStatus.Ignored; + } + + _loadedMapEntityId = _loadingMapEntityId; + _loadingMapEntityId = 0; + _currentMap = args.Entity.Logic as MapEntity; + if (_currentMap == null) + { + errorMessage = $"Loaded map entity logic is invalid. EntityId={args.Entity.Id}."; + return EventHandleStatus.Failed; + } + + return EventHandleStatus.Succeeded; + } + + public EventHandleStatus HandleShowEntityFailure(ShowEntityFailureEventArgs args, out string errorMessage) + { + errorMessage = null; + if (args == null) + { + return EventHandleStatus.Ignored; + } + + if (args.EntityLogicType != typeof(MapEntity) || args.EntityId != _loadingMapEntityId) + { + return EventHandleStatus.Ignored; + } + + _loadingMapEntityId = 0; + _currentMap = null; + errorMessage = $"Map load failed. Asset='{args.EntityAssetName}', Error='{args.ErrorMessage}'."; + return EventHandleStatus.Failed; + } + + public void HandleHideEntityComplete(HideEntityCompleteEventArgs args) + { + if (args == null) + { + return; + } + + if (args.EntityId == _loadedMapEntityId) + { + _loadedMapEntityId = 0; + _currentMap = null; + } + + if (args.EntityId == _loadingMapEntityId) + { + _loadingMapEntityId = 0; + } + } + + public EventHandleStatus HandleOpenUIFormSuccess(OpenUIFormSuccessEventArgs args, out string errorMessage) + { + errorMessage = null; + if (args == null || !_loadingCombatInfoFormSerialId.HasValue || args.UIForm == null) + { + return EventHandleStatus.Ignored; + } + + if (args.UIForm.SerialId != _loadingCombatInfoFormSerialId.Value) + { + return EventHandleStatus.Ignored; + } + + _isCombatInfoFormReady = args.UIForm.Logic is CombatInfoForm; + if (!_isCombatInfoFormReady) + { + errorMessage = "CombatInfoForm open success but form logic type is invalid."; + return EventHandleStatus.Failed; + } + + return EventHandleStatus.Succeeded; + } + + public EventHandleStatus HandleOpenUIFormFailure(OpenUIFormFailureEventArgs args, out string errorMessage) + { + errorMessage = null; + if (args == null || !_loadingCombatInfoFormSerialId.HasValue) + { + return EventHandleStatus.Ignored; + } + + if (args.SerialId != _loadingCombatInfoFormSerialId.Value) + { + return EventHandleStatus.Ignored; + } + + _isCombatInfoFormReady = false; + errorMessage = $"CombatInfoForm load failed. Asset='{args.UIFormAssetName}', Error='{args.ErrorMessage}'."; + return EventHandleStatus.Failed; + } + + public void HandleCloseUIFormComplete(CloseUIFormCompleteEventArgs args) + { + if (args == null || !_loadingCombatInfoFormSerialId.HasValue) + { + return; + } + + if (args.SerialId == _loadingCombatInfoFormSerialId.Value) + { + _loadingCombatInfoFormSerialId = null; + _isCombatInfoFormReady = false; + } + } + + private bool TryShowMap(DRLevel level, out string errorMessage) + { + errorMessage = null; + if (level == null) + { + errorMessage = "CombatLoadSession map load failed. Level is null."; + return false; + } + + string mapAssetName = level.Id.ToString(); + string mapAssetPath = AssetUtility.GetLevelMapAsset(mapAssetName); + if (GameEntry.Resource.HasAsset(mapAssetPath) == HasAssetResult.NotExist) + { + errorMessage = $"CombatLoadSession map asset not found. Level='{level.Id}', Asset='{mapAssetPath}'."; + return false; + } + + _loadingMapEntityId = _entity.GenerateSerialId(); + _entity.ShowMap(new MapData(_loadingMapEntityId, level.Id, Vector3.zero), mapAssetName); + return true; + } + + private bool TryOpenCombatInfoForm(out string errorMessage) + { + errorMessage = null; + if (_useCase == null) + { + _useCase = new CombatInfoFormUseCase(); + GameEntry.UIRouter.BindUIUseCase(UIFormType.CombatInfoForm, _useCase); + } + + int? serialId = GameEntry.UIRouter.OpenUI(UIFormType.CombatInfoForm); + if (!serialId.HasValue) + { + errorMessage = "CombatLoadSession failed to open CombatInfoForm."; + return false; + } + + _loadingCombatInfoFormSerialId = serialId.Value; + _isCombatInfoFormReady = GameEntry.UI.HasUIForm(serialId.Value); + return true; + } + + private void CloseCombatInfoForm() + { + GameEntry.UIRouter.CloseUI(UIFormType.CombatInfoForm); + _loadingCombatInfoFormSerialId = null; + _isCombatInfoFormReady = false; + } + } +} diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs.meta b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs.meta new file mode 100644 index 0000000..be71070 --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatLoadSession.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 36fe6a0f3baf4f69a1b131cd9b6fd223 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatNodeComponent.cs b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatNodeComponent.cs index 14d4b4a..832ed0d 100644 --- a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatNodeComponent.cs +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatNodeComponent.cs @@ -26,16 +26,46 @@ namespace GeometryTD.CustomComponent private readonly CombatScheduler _combatScheduler = new CombatScheduler(); private bool _runtimeInitialized; + private int _currentCoin; public LevelThemeType CurrentThemeType { get; private set; } public DRLevel CurrentLevel { get; private set; } + public int CurrentCoin => _currentCoin; + public bool CanEndCombat => _combatScheduler.CanEndCombat; + + public int CurrentLevelPhaseCount + { + get + { + if (CurrentLevel == null) + { + return 0; + } + + if (!_phasesByLevelId.TryGetValue(CurrentLevel.Id, out List phases) || phases == null) + { + return 0; + } + + return phases.Count; + } + } + + public int CurrentPhaseIndex + { + get + { + return _combatScheduler.DisplayPhaseIndex; + } + } public void OnInit(LevelThemeType themeType) { - ShutdownBattleRuntime(); + ShutdownCombatRuntime(); CurrentThemeType = themeType; CurrentLevel = null; + _currentCoin = 0; _levelsById.Clear(); _phasesByLevelId.Clear(); _spawnEntriesByPhaseId.Clear(); @@ -129,12 +159,12 @@ namespace GeometryTD.CustomComponent CountPhases(), CountEntries()); - EnsureBattleRuntimeInitialized(); + EnsureCombatRuntimeInitialized(); } public void StartCombat() { - if (!EnsureBattleRuntimeInitialized()) + if (!EnsureCombatRuntimeInitialized()) { Log.Warning("CombatNodeComponent start failed. Missing scheduler runtime."); return; @@ -169,15 +199,22 @@ namespace GeometryTD.CustomComponent } CurrentLevel = selectedLevel; + _currentCoin = Mathf.Max(0, selectedLevel.StartCoin); _combatScheduler.Start(selectedLevel, phaseList, _selectedSpawnEntriesByPhaseId); GameEntry.Event.Fire(this, NodeEnterEventArgs.Create()); } public void EndCombat() { + _currentCoin = 0; GameEntry.Event.Fire(this, NodeCompleteEventArgs.Create()); } + public bool TryEndCombatByPlayer() + { + return _combatScheduler.TryEndCombatByPlayer(); + } + public void OnUpdate(float elapseSeconds, float realElapseSeconds) { if (!_runtimeInitialized) @@ -191,7 +228,8 @@ namespace GeometryTD.CustomComponent public void OnShutdown() { CurrentLevel = null; - ShutdownBattleRuntime(); + _currentCoin = 0; + ShutdownCombatRuntime(); } private void OnDestroy() @@ -199,7 +237,7 @@ namespace GeometryTD.CustomComponent OnShutdown(); } - private bool EnsureBattleRuntimeInitialized() + private bool EnsureCombatRuntimeInitialized() { if (_runtimeInitialized) { @@ -211,7 +249,7 @@ namespace GeometryTD.CustomComponent return true; } - private void ShutdownBattleRuntime() + private void ShutdownCombatRuntime() { if (!_runtimeInitialized) { @@ -257,4 +295,4 @@ namespace GeometryTD.CustomComponent return count; } } -} \ No newline at end of file +} diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatScheduler.cs b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatScheduler.cs index a6dc3ac..b6a5429 100644 --- a/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatScheduler.cs +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/CombatScheduler.cs @@ -1,13 +1,6 @@ using System.Collections.Generic; -using System.Globalization; -using GameFramework.Event; -using GameFramework.Resource; -using GeometryTD.CustomUtility; using GeometryTD.DataTable; -using GeometryTD.Definition; using GeometryTD.Entity; -using GeometryTD.Entity.EntityData; -using UnityEngine; using UnityGameFramework.Runtime; namespace GeometryTD.CustomComponent @@ -17,43 +10,46 @@ namespace GeometryTD.CustomComponent private enum SchedulerState : byte { Idle = 0, - WaitingForMap = 1, + WaitingForLoading = 1, RunningPhase = 2, Completed = 3, Failed = 4 } private readonly List _phaseBuffer = new(); - private readonly Dictionary> _spawnEntriesByPhaseId = new(); - - private readonly EnemyManager _enemyManager = new EnemyManager(); + private readonly EnemyManager _enemyManager = new(); + private readonly PhaseLoopRuntime _phaseLoopRuntime = new(); + private readonly CombatLoadSession _loadSession = new(); + private readonly CombatEventBridge _eventBridge = new(); private EntityComponent _entity; private DRLevel _currentLevel; - private DRLevelPhase _currentPhase; - private int _currentPhaseIndex; - private float _currentPhaseElapsed; private SchedulerState _state = SchedulerState.Idle; - private int _loadingMapEntityId; - private int _loadedMapEntityId; private bool _initialized; - private bool _isEntityEventSubscribed; - private MapEntity _currentMap; - public bool IsRunning => _state == SchedulerState.WaitingForMap || _state == SchedulerState.RunningPhase; + public bool IsRunning => _state == SchedulerState.WaitingForLoading || _state == SchedulerState.RunningPhase; public bool IsCompleted => _state == SchedulerState.Completed; public DRLevel CurrentLevel => _currentLevel; - public DRLevelPhase CurrentPhase => _currentPhase; - public MapEntity CurrentMap => _currentMap; + public DRLevelPhase CurrentPhase => _phaseLoopRuntime.CurrentPhase; + public MapEntity CurrentMap => _loadSession.CurrentMap; + public int DisplayPhaseIndex => _phaseLoopRuntime.DisplayPhaseIndex; + public bool CanEndCombat => _phaseLoopRuntime.CanEndCombat; public void OnInit() { if (!_initialized) { _entity = GameEntry.Entity; - EnsureEntityEventSubscribed(); + _eventBridge.Bind( + OnShowEntitySuccess, + OnShowEntityFailure, + OnHideEntityComplete, + OnOpenUIFormSuccess, + OnOpenUIFormFailure, + OnCloseUIFormComplete); _enemyManager.OnInit(this); + _loadSession.OnInit(_entity); _initialized = true; } @@ -79,14 +75,18 @@ namespace GeometryTD.CustomComponent return; } - CleanupBattleEntities(); + CleanupCombatEntities(); _enemyManager.EndPhase(); ResetRuntime(); _currentLevel = level; - foreach (var phase in phases) + for (int i = 0; i < phases.Count; i++) { - _phaseBuffer.Add(phase); + DRLevelPhase phase = phases[i]; + if (phase != null) + { + _phaseBuffer.Add(phase); + } } if (spawnEntriesByPhaseId != null) @@ -97,33 +97,31 @@ namespace GeometryTD.CustomComponent } } - if (_phaseBuffer.Count <= 0) + _phaseLoopRuntime.SetPhases(_phaseBuffer); + if (_phaseLoopRuntime.PhaseCount <= 0) { _state = SchedulerState.Failed; Log.Warning("CombatScheduler start failed. Level '{0}' has no phase data.", level.Id); return; } - if (!TryShowMap(level)) + if (!_loadSession.StartLoading(level, out string loadError)) { _state = SchedulerState.Failed; + Log.Warning("CombatScheduler start failed. {0}", loadError); return; } - _currentPhase = null; - _currentPhaseIndex = -1; - _currentPhaseElapsed = 0f; - _state = SchedulerState.WaitingForMap; - - Log.Info("CombatScheduler started. Level={0}, PhaseCount={1}.", _currentLevel.Id, _phaseBuffer.Count); + _state = SchedulerState.WaitingForLoading; + Log.Info("CombatScheduler started. Level={0}, PhaseCount={1}.", _currentLevel.Id, _phaseLoopRuntime.PhaseCount); } public void OnUpdate(float elapseSeconds, float realElapseSeconds) { switch (_state) { - case SchedulerState.WaitingForMap: - if (_currentMap == null) + case SchedulerState.WaitingForLoading: + if (!_loadSession.IsReady) { return; } @@ -145,51 +143,49 @@ namespace GeometryTD.CustomComponent return; } - CleanupBattleEntities(); + CleanupCombatEntities(); _enemyManager.OnDestroy(); ResetRuntime(); - UnsubscribeEntityEvents(); + _eventBridge.Unbind(); _entity = null; _initialized = false; } - private bool TryShowMap(DRLevel level) + public bool TryEndCombatByPlayer() { - string mapAssetName = level.Id.ToString(); - string mapAssetPath = AssetUtility.GetLevelMapAsset(mapAssetName); - if (GameEntry.Resource.HasAsset(mapAssetPath) == HasAssetResult.NotExist) + if (_state == SchedulerState.Completed || _state == SchedulerState.Failed || _state == SchedulerState.Idle) { - Log.Warning( - "CombatScheduler start failed. Level '{0}' map asset not found: '{1}'.", - level.Id, - mapAssetPath); return false; } - _loadingMapEntityId = _entity.GenerateSerialId(); - _entity.ShowMap(new MapData(_loadingMapEntityId, level.Id, Vector3.zero), mapAssetName); + if (!_phaseLoopRuntime.TryRequestEndCombat()) + { + return false; + } - Log.Info( - "CombatScheduler loading map. Level={0}, Asset='{1}', EntityId={2}.", - level.Id, - mapAssetPath, - _loadingMapEntityId); + FinishCombat("Combat ended by player."); return true; } + private void RefreshCombatInfoForm() + { + _loadSession.RefreshCombatInfoForm(_currentLevel); + } + private void UpdateCurrentPhase(float elapseSeconds, float realElapseSeconds) { - if (_currentPhase == null) + DRLevelPhase currentPhase = _phaseLoopRuntime.CurrentPhase; + if (currentPhase == null) { _state = SchedulerState.Failed; Log.Warning("CombatScheduler update failed. Current phase is null."); return; } - _currentPhaseElapsed += elapseSeconds; + _phaseLoopRuntime.AdvancePhaseElapsed(elapseSeconds); _enemyManager.OnUpdate(elapseSeconds, realElapseSeconds); - if (!ShouldEndCurrentPhase()) + if (!_phaseLoopRuntime.ShouldEndCurrentPhase(_enemyManager.IsPhaseSpawnCompleted, _enemyManager.AliveEnemyCount)) { return; } @@ -197,229 +193,134 @@ namespace GeometryTD.CustomComponent CompleteCurrentPhase(); } - private bool ShouldEndCurrentPhase() - { - switch (_currentPhase.EndType) - { - case PhaseEndType.TimeElapsed: - return _currentPhaseElapsed >= ResolveTimeElapsedThreshold(_currentPhase); - case PhaseEndType.EnemiesCleared: - case PhaseEndType.BossDead: - return _enemyManager.IsPhaseSpawnCompleted && _enemyManager.AliveEnemyCount <= 0; - case PhaseEndType.None: - default: - if (_currentPhase.DurationSeconds > 0 && _currentPhaseElapsed >= _currentPhase.DurationSeconds) - { - return true; - } - - return _enemyManager.IsPhaseSpawnCompleted && _enemyManager.AliveEnemyCount <= 0; - } - } - - private float ResolveTimeElapsedThreshold(DRLevelPhase phase) - { - if (!string.IsNullOrWhiteSpace(phase.EndParam) && - float.TryParse(phase.EndParam, NumberStyles.Float, CultureInfo.InvariantCulture, - out float parsedSeconds)) - { - return parsedSeconds; - } - - if (phase.DurationSeconds > 0) - { - return phase.DurationSeconds; - } - - return 0f; - } - private void CompleteCurrentPhase() { _enemyManager.EndPhase(); Log.Info( "CombatScheduler phase completed. Level={0}, Phase={1}, Elapsed={2:F2}s.", _currentLevel != null ? _currentLevel.Id : 0, - _currentPhase != null ? _currentPhase.Id : 0, - _currentPhaseElapsed); + _phaseLoopRuntime.CurrentPhase != null ? _phaseLoopRuntime.CurrentPhase.Id : 0, + _phaseLoopRuntime.CurrentPhaseElapsed); BeginNextPhase(); } private void BeginNextPhase() { - _currentPhaseIndex++; - if (_currentPhaseIndex >= _phaseBuffer.Count) + if (!_phaseLoopRuntime.TryEnterNextPhase(out DRLevelPhase nextPhase)) { - _state = SchedulerState.Completed; - _currentPhase = null; - if (_currentMap != null) - { - _entity.HideEntity(_currentMap); - } - Log.Info("CombatScheduler level completed. Level={0}.", _currentLevel != null ? _currentLevel.Id : 0); - GameEntry.CombatNode.EndCombat(); + FinishCombat("Combat ended after loop completion."); return; } - _currentPhase = _phaseBuffer[_currentPhaseIndex]; - _currentPhaseElapsed = 0f; + RefreshCombatInfoForm(); - IReadOnlyList spawnEntries = null; - _spawnEntriesByPhaseId.TryGetValue(_currentPhase.Id, out spawnEntries); - _enemyManager.BeginPhase(_currentPhase, spawnEntries); + _spawnEntriesByPhaseId.TryGetValue(nextPhase.Id, out IReadOnlyList spawnEntries); + _enemyManager.BeginPhase(nextPhase, spawnEntries); _state = SchedulerState.RunningPhase; Log.Info( "CombatScheduler phase started. Level={0}, Phase={1}, EndType={2}, Entries={3}.", _currentLevel != null ? _currentLevel.Id : 0, - _currentPhase.Id, - _currentPhase.EndType, + _phaseLoopRuntime.DisplayPhaseIndex, + nextPhase.EndType, spawnEntries != null ? spawnEntries.Count : 0); } - private void EnsureEntityEventSubscribed() + private void FinishCombat(string reason) { - if (_isEntityEventSubscribed) - { - return; - } + _state = SchedulerState.Completed; + CleanupCombatEntities(); + _enemyManager.EndPhase(); - GameEntry.Event.Subscribe(ShowEntitySuccessEventArgs.EventId, OnShowEntitySuccess); - GameEntry.Event.Subscribe(ShowEntityFailureEventArgs.EventId, OnShowEntityFailure); - GameEntry.Event.Subscribe(HideEntityCompleteEventArgs.EventId, OnHideEntityComplete); - _isEntityEventSubscribed = true; - } - - private void UnsubscribeEntityEvents() - { - if (!_isEntityEventSubscribed) - { - return; - } - - GameEntry.Event.Unsubscribe(ShowEntitySuccessEventArgs.EventId, OnShowEntitySuccess); - GameEntry.Event.Unsubscribe(ShowEntityFailureEventArgs.EventId, OnShowEntityFailure); - GameEntry.Event.Unsubscribe(HideEntityCompleteEventArgs.EventId, OnHideEntityComplete); - _isEntityEventSubscribed = false; + Log.Info( + "CombatScheduler level completed. Level={0}. Reason={1}", + _currentLevel != null ? _currentLevel.Id : 0, + reason); + GameEntry.CombatNode.EndCombat(); } private void ResetRuntime() { _phaseBuffer.Clear(); _spawnEntriesByPhaseId.Clear(); + _phaseLoopRuntime.Reset(); + _loadSession.Reset(); _currentLevel = null; - _currentPhase = null; - _currentPhaseIndex = -1; - _currentPhaseElapsed = 0f; - _loadingMapEntityId = 0; - _loadedMapEntityId = 0; - _currentMap = null; _state = SchedulerState.Idle; } - private void CleanupBattleEntities() + private void CleanupCombatEntities() { - if (_entity == null) - { - return; - } - - if (_loadingMapEntityId != 0 && _entity.IsLoadingEntity(_loadingMapEntityId)) - { - _entity.HideEntity(_loadingMapEntityId); - } - - if (_currentMap != null) - { - _entity.HideEntity(_currentMap); - } - else if (_loadedMapEntityId != 0) - { - UnityGameFramework.Runtime.Entity loadedMapEntity = _entity.GetEntity(_loadedMapEntityId); - if (loadedMapEntity != null) - { - _entity.HideEntity(loadedMapEntity); - } - } - + _loadSession.Cleanup(); _enemyManager.CleanupTrackedEnemies(); } #region Event Handlers - private void OnShowEntitySuccess(object sender, GameEventArgs e) + private void OnShowEntitySuccess(ShowEntitySuccessEventArgs args) { - if (!(e is ShowEntitySuccessEventArgs ne)) - { - return; - } - - if (ne.EntityLogicType != typeof(MapEntity) || ne.Entity.Id != _loadingMapEntityId) - { - return; - } - - _loadedMapEntityId = _loadingMapEntityId; - _loadingMapEntityId = 0; - _currentMap = ne.Entity.Logic as MapEntity; - if (_currentMap == null) + var status = _loadSession.HandleShowEntitySuccess(args, out string errorMessage); + if (status == CombatLoadSession.EventHandleStatus.Failed) { _state = SchedulerState.Failed; - Log.Error("Loaded map entity logic is invalid. EntityId={0}.", ne.Entity.Id); + Log.Error("CombatScheduler failed. {0}", errorMessage); return; } - Log.Info( - "Map ready. LevelId={0}, PathCells={1}, FoundationCells={2}, Spawners={3}, House={4}.", - _currentLevel != null ? _currentLevel.Id : 0, - _currentMap.PathCells.Count, - _currentMap.FoundationCells.Count, - _currentMap.Spawners.Length, - _currentMap.House != null ? _currentMap.House.name : "None"); + if (status == CombatLoadSession.EventHandleStatus.Succeeded) + { + MapEntity map = _loadSession.CurrentMap; + Log.Info( + "Map ready. LevelId={0}, PathCells={1}, FoundationCells={2}, Spawners={3}, House={4}.", + _currentLevel != null ? _currentLevel.Id : 0, + map.PathCells.Count, + map.FoundationCells.Count, + map.Spawners.Length, + map.House != null ? map.House.name : "None"); + } } - private void OnShowEntityFailure(object sender, GameEventArgs e) + private void OnShowEntityFailure(ShowEntityFailureEventArgs args) { - if (!(e is ShowEntityFailureEventArgs ne)) + var status = _loadSession.HandleShowEntityFailure(args, out string errorMessage); + if (status == CombatLoadSession.EventHandleStatus.Failed) { - return; + _state = SchedulerState.Failed; + Log.Error("CombatScheduler failed. LevelId={0}, {1}", _currentLevel != null ? _currentLevel.Id : 0, errorMessage); } - - if (ne.EntityLogicType != typeof(MapEntity) || ne.EntityId != _loadingMapEntityId) - { - return; - } - - _loadingMapEntityId = 0; - _currentMap = null; - _state = SchedulerState.Failed; - Log.Error( - "Map load failed. LevelId={0}, Asset='{1}', Error='{2}'.", - _currentLevel != null ? _currentLevel.Id : 0, - ne.EntityAssetName, - ne.ErrorMessage); } - private void OnHideEntityComplete(object sender, GameEventArgs e) + private void OnHideEntityComplete(HideEntityCompleteEventArgs args) { - if (!(e is HideEntityCompleteEventArgs ne)) - { - return; - } + _loadSession.HandleHideEntityComplete(args); + } - if (ne.EntityId == _loadedMapEntityId) + private void OnOpenUIFormSuccess(OpenUIFormSuccessEventArgs args) + { + var status = _loadSession.HandleOpenUIFormSuccess(args, out string errorMessage); + if (status == CombatLoadSession.EventHandleStatus.Failed) { - _loadedMapEntityId = 0; - _currentMap = null; + _state = SchedulerState.Failed; + Log.Error("CombatScheduler failed. {0}", errorMessage); } + } - if (ne.EntityId == _loadingMapEntityId) + private void OnOpenUIFormFailure(OpenUIFormFailureEventArgs args) + { + var status = _loadSession.HandleOpenUIFormFailure(args, out string errorMessage); + if (status == CombatLoadSession.EventHandleStatus.Failed) { - _loadingMapEntityId = 0; + _state = SchedulerState.Failed; + Log.Error("CombatScheduler failed. {0}", errorMessage); } } + private void OnCloseUIFormComplete(CloseUIFormCompleteEventArgs args) + { + _loadSession.HandleCloseUIFormComplete(args); + } + #endregion } } diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs b/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs new file mode 100644 index 0000000..e548755 --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs @@ -0,0 +1,144 @@ +using System.Collections.Generic; +using System.Globalization; +using GeometryTD.DataTable; +using GeometryTD.Definition; +using UnityEngine; + +namespace GeometryTD.CustomComponent +{ + internal sealed class PhaseLoopRuntime + { + private readonly List _phases = new(); + + private DRLevelPhase _currentPhase; + private int _currentPhaseIndex = -1; + private int _displayPhaseIndex; + private int _completedLoopCount; + private bool _canEndCombat; + private bool _endCombatRequested; + private float _currentPhaseElapsed; + + public DRLevelPhase CurrentPhase => _currentPhase; + public int DisplayPhaseIndex => _displayPhaseIndex; + public bool CanEndCombat => _canEndCombat; + public float CurrentPhaseElapsed => _currentPhaseElapsed; + public int PhaseCount => _phases.Count; + + public void Reset() + { + _phases.Clear(); + _currentPhase = null; + _currentPhaseIndex = -1; + _displayPhaseIndex = 0; + _completedLoopCount = 0; + _canEndCombat = false; + _endCombatRequested = false; + _currentPhaseElapsed = 0f; + } + + public void SetPhases(IReadOnlyList phases) + { + _phases.Clear(); + if (phases == null) + { + return; + } + + for (int i = 0; i < phases.Count; i++) + { + DRLevelPhase phase = phases[i]; + if (phase != null) + { + _phases.Add(phase); + } + } + } + + public bool TryRequestEndCombat() + { + if (!_canEndCombat) + { + return false; + } + + _endCombatRequested = true; + return true; + } + + public void AdvancePhaseElapsed(float elapseSeconds) + { + _currentPhaseElapsed += elapseSeconds; + } + + public bool ShouldEndCurrentPhase(bool isPhaseSpawnCompleted, int aliveEnemyCount) + { + if (_currentPhase == null) + { + return false; + } + + switch (_currentPhase.EndType) + { + case PhaseEndType.TimeElapsed: + return _currentPhaseElapsed >= ResolveTimeElapsedThreshold(_currentPhase); + case PhaseEndType.EnemiesCleared: + case PhaseEndType.BossDead: + return isPhaseSpawnCompleted && aliveEnemyCount <= 0; + case PhaseEndType.None: + default: + if (_currentPhase.DurationSeconds > 0 && _currentPhaseElapsed >= _currentPhase.DurationSeconds) + { + return true; + } + + return isPhaseSpawnCompleted && aliveEnemyCount <= 0; + } + } + + public bool TryEnterNextPhase(out DRLevelPhase nextPhase) + { + nextPhase = null; + if (_phases.Count <= 0) + { + return false; + } + + _currentPhaseIndex++; + if (_currentPhaseIndex >= _phases.Count) + { + _completedLoopCount++; + _canEndCombat = true; + + if (_endCombatRequested) + { + _currentPhase = null; + return false; + } + + _currentPhaseIndex = 0; + } + + _currentPhase = _phases[_currentPhaseIndex]; + _displayPhaseIndex = _completedLoopCount * _phases.Count + _currentPhaseIndex + 1; + _currentPhaseElapsed = 0f; + nextPhase = _currentPhase; + return true; + } + + private static float ResolveTimeElapsedThreshold(DRLevelPhase phase) + { + if (!string.IsNullOrWhiteSpace(phase.EndParam) && + float.TryParse(phase.EndParam, NumberStyles.Float, CultureInfo.InvariantCulture, out float parsed)) + { + return parsed; + } + + if (phase.DurationSeconds > 0) + { + return phase.DurationSeconds; + } + + return 0f; + } + } +} diff --git a/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs.meta b/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs.meta new file mode 100644 index 0000000..853461a --- /dev/null +++ b/Assets/GameMain/Scripts/CustomComponent/CombatNode/PhaseLoopRuntime.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bdde0f128bc4f249a3e1254b8fd2d06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/Definition/Enum/UIFormType.cs b/Assets/GameMain/Scripts/Definition/Enum/UIFormType.cs index cc11d30..3138449 100644 --- a/Assets/GameMain/Scripts/Definition/Enum/UIFormType.cs +++ b/Assets/GameMain/Scripts/Definition/Enum/UIFormType.cs @@ -30,21 +30,26 @@ /// /// 主界面。 /// - MainForm = 103, + MainForm = 110, /// - /// 测试菜单。 + /// 仓库界面。 /// - TestMenuForm = 150, + RepoForm = 111, /// /// 事件节点界面。 /// - EventForm = 200, + EventForm = 130, /// - /// 仓库界面。 + /// 战斗信息界面。 /// - RepoForm = 201, + CombatInfoForm = 140, + + /// + /// 测试菜单。 + /// + TestMenuForm = 200, } } diff --git a/Assets/GameMain/Scripts/Event/Combat.meta b/Assets/GameMain/Scripts/Event/Combat.meta new file mode 100644 index 0000000..c07b082 --- /dev/null +++ b/Assets/GameMain/Scripts/Event/Combat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cdb0a344cf2444689738e630c3373272 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs b/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs new file mode 100644 index 0000000..b2a9589 --- /dev/null +++ b/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs @@ -0,0 +1,25 @@ +using GameFramework; +using GameFramework.Event; + +namespace GeometryTD.CustomEvent +{ + public class CombatEndEventArgs : GameEventArgs + { + public static int EventId => typeof(CombatEndEventArgs).GetHashCode(); + + public override int Id => EventId; + + public CombatEndEventArgs() + { + } + + public static CombatEndEventArgs Create() + { + return ReferencePool.Acquire(); + } + + public override void Clear() + { + } + } +} \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs.meta b/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs.meta new file mode 100644 index 0000000..169288f --- /dev/null +++ b/Assets/GameMain/Scripts/Event/Combat/CombatEndEventArgs.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 67125e6978864d1e9a9dc95d58754ece +timeCreated: 1772337764 \ No newline at end of file diff --git a/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs b/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs new file mode 100644 index 0000000..97f0bdd --- /dev/null +++ b/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs @@ -0,0 +1,21 @@ +using GameFramework; +using GameFramework.Event; + +namespace GeometryTD.CustomEvent +{ + public class CombatPauseEventArgs : GameEventArgs + { + public static int EventId => typeof(CombatPauseEventArgs).GetHashCode(); + + public override int Id => EventId; + + public static CombatPauseEventArgs Create() + { + return ReferencePool.Acquire(); + } + + public override void Clear() + { + } + } +} diff --git a/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs.meta b/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs.meta new file mode 100644 index 0000000..e8e4260 --- /dev/null +++ b/Assets/GameMain/Scripts/Event/Combat/CombatPauseEventArgs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3f77aa61070549da81354890c4281afb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat.meta b/Assets/GameMain/Scripts/UI/Combat.meta new file mode 100644 index 0000000..3079ea9 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 638583d0231ea31459f5c3dd4e934ce5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/Context.meta b/Assets/GameMain/Scripts/UI/Combat/Context.meta new file mode 100644 index 0000000..0f38122 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Context.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f613b24c1e065e542b7bb847939acba3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs b/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs new file mode 100644 index 0000000..5b1d029 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs @@ -0,0 +1,11 @@ +namespace GeometryTD.UI +{ + public class CombatInfoFormContext : UIContext + { + public string LevelMetaText; + public string LevelPhaseText; + public string CoinText; + public bool CanPause; + public bool CanEnd; + } +} diff --git a/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs.meta b/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs.meta new file mode 100644 index 0000000..778fd28 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Context/CombatInfoFormContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0f486ea7237d4edb9e56147cf540ae69 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/Controller.meta b/Assets/GameMain/Scripts/UI/Combat/Controller.meta new file mode 100644 index 0000000..a75c5fd --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a49c1dd9119c8d34c95ea2a22dcd7d2c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs new file mode 100644 index 0000000..d2c6baa --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs @@ -0,0 +1,151 @@ +using GeometryTD.CustomEvent; +using GeometryTD.Definition; +using GameFramework.Event; +using UnityGameFramework.Runtime; + +namespace GeometryTD.UI +{ + public class CombatInfoFormController : UIFormControllerCommonBase + { + private CombatInfoFormUseCase _useCase; + + protected override UIFormType UIFormTypeId => UIFormType.CombatInfoForm; + + protected override void RefreshUI(CombatInfoForm form, CombatInfoFormContext context) + { + form.RefreshUI(context); + } + + protected override void SubscribeCustomEvents() + { + GameEntry.Event.Subscribe(CombatPauseEventArgs.EventId, OnCombatPauseButtonClicked); + GameEntry.Event.Subscribe(CombatEndEventArgs.EventId, OnCombatEndButtonClicked); + } + + protected override void UnsubscribeCustomEvents() + { + GameEntry.Event.Unsubscribe(CombatPauseEventArgs.EventId, OnCombatPauseButtonClicked); + GameEntry.Event.Unsubscribe(CombatEndEventArgs.EventId, OnCombatEndButtonClicked); + } + + public int? OpenUI(CombatInfoFormRawData rawData) + { + CombatInfoFormContext context = BuildContext(rawData); + return OpenUIInternal(context); + } + + public override int? OpenUI(object userData = null) + { + if (userData is CombatInfoFormContext context) + { + return OpenUIInternal(context); + } + + if (userData is CombatInfoFormRawData rawDataFromUserData) + { + return OpenUI(rawDataFromUserData); + } + + if (userData != null) + { + Log.Warning("CombatInfoFormController.OpenUI() userData type is invalid."); + return null; + } + + if (_useCase == null) + { + Log.Error("CombatInfoFormController.OpenUI() useCase is null."); + return null; + } + + CombatInfoFormRawData rawData = _useCase.CreateInitialModel(); + return OpenUI(rawData); + } + + public override void BindUseCase(IUIUseCase useCase) + { + if (!(useCase is CombatInfoFormUseCase combatInfoFormUseCase)) + { + Log.Error("CombatInfoFormController.BindUseCase() useCase is invalid."); + return; + } + + _useCase = combatInfoFormUseCase; + } + + private static CombatInfoFormContext BuildContext(CombatInfoFormRawData rawData) + { + if (rawData == null) + { + return null; + } + + return new CombatInfoFormContext + { + LevelMetaText = BuildLevelMetaText(rawData.LevelThemeType, rawData.LevelId), + LevelPhaseText = BuildPhaseText(rawData.CurrentPhaseIndex, rawData.TotalPhaseCount), + CoinText = BuildCoinText(rawData.Coin), + CanPause = rawData.CanPause, + CanEnd = rawData.CanEnd + }; + } + + private static string BuildLevelMetaText(LevelThemeType themeType, int levelId) + { + if (levelId <= 0) + { + return "Map -"; + } + + return $"{themeType} Map.{levelId}"; + } + + private static string BuildPhaseText(int currentPhaseIndex, int totalPhaseCount) + { + int phaseIndex = currentPhaseIndex < 0 ? 0 : currentPhaseIndex; + if (totalPhaseCount <= 0) + { + return $"{phaseIndex}/?"; + } + + return $"Wave: {phaseIndex}/{totalPhaseCount}"; + } + + private static string BuildCoinText(int coin) + { + if (coin < 0) + { + return "Coin: -"; + } + + return $"Coin: {coin}"; + } + + private void OnCombatPauseButtonClicked(object sender, GameEventArgs e) + { + if (!(sender is CombatInfoForm) || !(e is CombatPauseEventArgs)) + { + return; + } + + GameEntry.UIRouter.OpenUI(UIFormType.DialogForm, new DialogFormRawData + { + Mode = 1, + Title = "Pause", + Message = "Game paused.", + PauseGame = true, + ConfirmText = "Continue" + }); + } + + private void OnCombatEndButtonClicked(object sender, GameEventArgs e) + { + if (!(sender is CombatInfoForm) || !(e is CombatEndEventArgs)) + { + return; + } + + _useCase?.TryEndCombat(); + } + } +} diff --git a/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs.meta b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs.meta new file mode 100644 index 0000000..5cb0e77 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/Controller/CombatInfoFormController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cb66e5d005d549938b7b4bb68c6d66e7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/RawData.meta b/Assets/GameMain/Scripts/UI/Combat/RawData.meta new file mode 100644 index 0000000..77068c1 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/RawData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca167152dba83864bbcd398e6d984d89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs b/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs new file mode 100644 index 0000000..cbac926 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs @@ -0,0 +1,15 @@ +using GeometryTD.Definition; + +namespace GeometryTD.UI +{ + public class CombatInfoFormRawData + { + public LevelThemeType LevelThemeType; + public int LevelId; + public int CurrentPhaseIndex; + public int TotalPhaseCount; + public int Coin; + public bool CanPause; + public bool CanEnd; + } +} diff --git a/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs.meta b/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs.meta new file mode 100644 index 0000000..7709dad --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/RawData/CombatInfoFormRawData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf24b0e63c6b4863a90d4a3261378106 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/UseCase.meta b/Assets/GameMain/Scripts/UI/Combat/UseCase.meta new file mode 100644 index 0000000..9852fee --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/UseCase.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28613671adff3fc44b3c6ace7957869d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs b/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs new file mode 100644 index 0000000..d19f14a --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs @@ -0,0 +1,50 @@ +using GeometryTD.Definition; + +namespace GeometryTD.UI +{ + public class CombatInfoFormUseCase : IUIUseCase + { + public CombatInfoFormRawData CreateInitialModel() + { + return BuildModel(); + } + + public CombatInfoFormRawData TryRefresh() + { + return BuildModel(); + } + + public bool TryEndCombat() + { + if (GameEntry.CombatNode == null || !GameEntry.CombatNode.CanEndCombat) + { + return false; + } + + return GameEntry.CombatNode.TryEndCombatByPlayer(); + } + + private static CombatInfoFormRawData BuildModel() + { + if (GameEntry.CombatNode == null) + { + return null; + } + + var level = GameEntry.CombatNode.CurrentLevel; + LevelThemeType themeType = level != null ? level.LevelThemeType : GameEntry.CombatNode.CurrentThemeType; + int levelId = level != null ? level.Id : 0; + + return new CombatInfoFormRawData + { + LevelThemeType = themeType, + LevelId = levelId, + CurrentPhaseIndex = GameEntry.CombatNode.CurrentPhaseIndex, + TotalPhaseCount = GameEntry.CombatNode.CurrentLevelPhaseCount, + Coin = GameEntry.CombatNode.CurrentCoin, + CanPause = true, + CanEnd = GameEntry.CombatNode.CanEndCombat + }; + } + } +} diff --git a/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs.meta b/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs.meta new file mode 100644 index 0000000..04789f0 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/UseCase/CombatInfoFormUseCase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7bc6a5500e554439bf8c760a779ae87c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/View.meta b/Assets/GameMain/Scripts/UI/Combat/View.meta new file mode 100644 index 0000000..5e801fe --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/View.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f1d770766799a63488692f296e0d42f7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs b/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs new file mode 100644 index 0000000..b4c6ff2 --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs @@ -0,0 +1,107 @@ +using GeometryTD.CustomEvent; +using TMPro; +using UnityEngine; +using UnityGameFramework.Runtime; + +namespace GeometryTD.UI +{ + public class CombatInfoForm : UGuiForm + { + [SerializeField] private TMP_Text _levelMetaText; + + [SerializeField] private TMP_Text _levelPhaseText; + + [SerializeField] private TMP_Text _coinText; + + [SerializeField] private CommonButton _pauseButton; + + [SerializeField] private CommonButton _endButton; + + private CombatInfoFormContext _context; + + public void RefreshUI(CombatInfoFormContext context) + { + _context = context; + + if (_levelMetaText != null) + { + _levelMetaText.text = context?.LevelMetaText ?? string.Empty; + } + + if (_levelPhaseText != null) + { + _levelPhaseText.text = context?.LevelPhaseText ?? string.Empty; + } + + if (_coinText != null) + { + _coinText.text = context?.CoinText ?? "0"; + } + + if (_pauseButton != null) + { + _pauseButton.Interactive = context?.CanPause ?? false; + } + + if (_endButton != null) + { + _endButton.gameObject.SetActive(context?.CanEnd ?? false); + } + } + + public void OnPauseButtonClick() + { + if (_context != null && !_context.CanPause) + { + return; + } + + GameEntry.Event.Fire(this, CombatPauseEventArgs.Create()); + } + + public void OnEndButtonClick() + { + if (_context != null && !_context.CanEnd) + { + return; + } + + GameEntry.Event.Fire(this, CombatEndEventArgs.Create()); + } + + protected override void OnOpen(object userData) + { + base.OnOpen(userData); + + if (userData is CombatInfoFormContext context) + { + RefreshUI(context); + return; + } + + Log.Warning("CombatInfoForm requires CombatInfoFormContext as userData."); + } + + protected override void OnClose(bool isShutdown, object userData) + { + _context = null; + + if (_levelMetaText != null) + { + _levelMetaText.text = string.Empty; + } + + if (_levelPhaseText != null) + { + _levelPhaseText.text = string.Empty; + } + + if (_coinText != null) + { + _coinText.text = string.Empty; + } + + base.OnClose(isShutdown, userData); + } + } +} diff --git a/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs.meta b/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs.meta new file mode 100644 index 0000000..0df5c5f --- /dev/null +++ b/Assets/GameMain/Scripts/UI/Combat/View/CombatInfoForm.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b3971fa7b9e17b04a97d7f10d1472a80 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GameMain/Scripts/UI/GameScene.meta b/Assets/GameMain/Scripts/UI/Game.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene.meta rename to Assets/GameMain/Scripts/UI/Game.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context.meta b/Assets/GameMain/Scripts/UI/Game/Context.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context.meta rename to Assets/GameMain/Scripts/UI/Game/Context.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/CombineAreaContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/CombineAreaContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/CombineAreaContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/CombineAreaContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/CombineAreaContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/CombineAreaContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/CombineAreaContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/CombineAreaContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/CompAreaContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/CompAreaContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/CompAreaContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/CompAreaContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/CompAreaContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/CompAreaContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/CompAreaContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/CompAreaContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/EventFormContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/EventFormContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/EventFormContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/EventFormContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/EventFormContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/EventFormContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/EventFormContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/EventFormContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/EventOptionItemContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/EventOptionItemContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/EventOptionItemContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/EventOptionItemContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/EventOptionItemContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/EventOptionItemContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/EventOptionItemContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/EventOptionItemContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/MainFormContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/MainFormContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/MainFormContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/MainFormContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/MainFormContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/MainFormContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/MainFormContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/MainFormContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/RepoFormContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/RepoFormContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/RepoFormContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/RepoFormContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/RepoFormContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/RepoFormContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/RepoFormContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/RepoFormContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/RepoItemContext.cs b/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/RepoItemContext.cs rename to Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Context/RepoItemContext.cs.meta b/Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Context/RepoItemContext.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Context/RepoItemContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller.meta b/Assets/GameMain/Scripts/UI/Game/Controller.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller.meta rename to Assets/GameMain/Scripts/UI/Game/Controller.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/EventFormController.cs b/Assets/GameMain/Scripts/UI/Game/Controller/EventFormController.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/EventFormController.cs rename to Assets/GameMain/Scripts/UI/Game/Controller/EventFormController.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/EventFormController.cs.meta b/Assets/GameMain/Scripts/UI/Game/Controller/EventFormController.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/EventFormController.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Controller/EventFormController.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/MainFormController.cs b/Assets/GameMain/Scripts/UI/Game/Controller/MainFormController.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/MainFormController.cs rename to Assets/GameMain/Scripts/UI/Game/Controller/MainFormController.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/MainFormController.cs.meta b/Assets/GameMain/Scripts/UI/Game/Controller/MainFormController.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/MainFormController.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Controller/MainFormController.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/RepoFormController.cs b/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/RepoFormController.cs rename to Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/Controller/RepoFormController.cs.meta b/Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/Controller/RepoFormController.cs.meta rename to Assets/GameMain/Scripts/UI/Game/Controller/RepoFormController.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/RawData.meta b/Assets/GameMain/Scripts/UI/Game/RawData.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/RawData.meta rename to Assets/GameMain/Scripts/UI/Game/RawData.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/RawData/EventFormRawData.cs b/Assets/GameMain/Scripts/UI/Game/RawData/EventFormRawData.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/RawData/EventFormRawData.cs rename to Assets/GameMain/Scripts/UI/Game/RawData/EventFormRawData.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/RawData/EventFormRawData.cs.meta b/Assets/GameMain/Scripts/UI/Game/RawData/EventFormRawData.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/RawData/EventFormRawData.cs.meta rename to Assets/GameMain/Scripts/UI/Game/RawData/EventFormRawData.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/RawData/RepoFormRawData.cs b/Assets/GameMain/Scripts/UI/Game/RawData/RepoFormRawData.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/RawData/RepoFormRawData.cs rename to Assets/GameMain/Scripts/UI/Game/RawData/RepoFormRawData.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/RawData/RepoFormRawData.cs.meta b/Assets/GameMain/Scripts/UI/Game/RawData/RepoFormRawData.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/RawData/RepoFormRawData.cs.meta rename to Assets/GameMain/Scripts/UI/Game/RawData/RepoFormRawData.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/UseCase.meta b/Assets/GameMain/Scripts/UI/Game/UseCase.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/UseCase.meta rename to Assets/GameMain/Scripts/UI/Game/UseCase.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/UseCase/EventFormUseCase.cs b/Assets/GameMain/Scripts/UI/Game/UseCase/EventFormUseCase.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/UseCase/EventFormUseCase.cs rename to Assets/GameMain/Scripts/UI/Game/UseCase/EventFormUseCase.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/UseCase/EventFormUseCase.cs.meta b/Assets/GameMain/Scripts/UI/Game/UseCase/EventFormUseCase.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/UseCase/EventFormUseCase.cs.meta rename to Assets/GameMain/Scripts/UI/Game/UseCase/EventFormUseCase.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/UseCase/RepoFormUseCase.cs b/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/UseCase/RepoFormUseCase.cs rename to Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/UseCase/RepoFormUseCase.cs.meta b/Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/UseCase/RepoFormUseCase.cs.meta rename to Assets/GameMain/Scripts/UI/Game/UseCase/RepoFormUseCase.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View.meta b/Assets/GameMain/Scripts/UI/Game/View.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View.meta rename to Assets/GameMain/Scripts/UI/Game/View.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CombineArea.cs b/Assets/GameMain/Scripts/UI/Game/View/CombineArea.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CombineArea.cs rename to Assets/GameMain/Scripts/UI/Game/View/CombineArea.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CombineArea.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/CombineArea.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CombineArea.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/CombineArea.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CombineSlotItem.cs b/Assets/GameMain/Scripts/UI/Game/View/CombineSlotItem.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CombineSlotItem.cs rename to Assets/GameMain/Scripts/UI/Game/View/CombineSlotItem.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CombineSlotItem.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/CombineSlotItem.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CombineSlotItem.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/CombineSlotItem.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CompArea.cs b/Assets/GameMain/Scripts/UI/Game/View/CompArea.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CompArea.cs rename to Assets/GameMain/Scripts/UI/Game/View/CompArea.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/CompArea.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/CompArea.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/CompArea.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/CompArea.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/EventForm.cs b/Assets/GameMain/Scripts/UI/Game/View/EventForm.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/EventForm.cs rename to Assets/GameMain/Scripts/UI/Game/View/EventForm.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/EventForm.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/EventForm.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/EventForm.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/EventForm.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/EventOptionItem.cs b/Assets/GameMain/Scripts/UI/Game/View/EventOptionItem.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/EventOptionItem.cs rename to Assets/GameMain/Scripts/UI/Game/View/EventOptionItem.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/EventOptionItem.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/EventOptionItem.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/EventOptionItem.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/EventOptionItem.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/MainForm.cs b/Assets/GameMain/Scripts/UI/Game/View/MainForm.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/MainForm.cs rename to Assets/GameMain/Scripts/UI/Game/View/MainForm.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/MainForm.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/MainForm.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/MainForm.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/MainForm.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/RepoForm.cs b/Assets/GameMain/Scripts/UI/Game/View/RepoForm.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/RepoForm.cs rename to Assets/GameMain/Scripts/UI/Game/View/RepoForm.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/RepoForm.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/RepoForm.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/RepoForm.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/RepoForm.cs.meta diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/RepoItem.cs b/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/RepoItem.cs rename to Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs diff --git a/Assets/GameMain/Scripts/UI/GameScene/View/RepoItem.cs.meta b/Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/GameScene/View/RepoItem.cs.meta rename to Assets/GameMain/Scripts/UI/Game/View/RepoItem.cs.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene.meta b/Assets/GameMain/Scripts/UI/Menu.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene.meta rename to Assets/GameMain/Scripts/UI/Menu.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Context.meta b/Assets/GameMain/Scripts/UI/Menu/Context.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Context.meta rename to Assets/GameMain/Scripts/UI/Menu/Context.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Context/TestMenuFormContext.cs b/Assets/GameMain/Scripts/UI/Menu/Context/TestMenuFormContext.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Context/TestMenuFormContext.cs rename to Assets/GameMain/Scripts/UI/Menu/Context/TestMenuFormContext.cs diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Context/TestMenuFormContext.cs.meta b/Assets/GameMain/Scripts/UI/Menu/Context/TestMenuFormContext.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Context/TestMenuFormContext.cs.meta rename to Assets/GameMain/Scripts/UI/Menu/Context/TestMenuFormContext.cs.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Controller.meta b/Assets/GameMain/Scripts/UI/Menu/Controller.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Controller.meta rename to Assets/GameMain/Scripts/UI/Menu/Controller.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Controller/TestMenuFormController.cs b/Assets/GameMain/Scripts/UI/Menu/Controller/TestMenuFormController.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Controller/TestMenuFormController.cs rename to Assets/GameMain/Scripts/UI/Menu/Controller/TestMenuFormController.cs diff --git a/Assets/GameMain/Scripts/UI/MenuScene/Controller/TestMenuFormController.cs.meta b/Assets/GameMain/Scripts/UI/Menu/Controller/TestMenuFormController.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/Controller/TestMenuFormController.cs.meta rename to Assets/GameMain/Scripts/UI/Menu/Controller/TestMenuFormController.cs.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/RawData.meta b/Assets/GameMain/Scripts/UI/Menu/RawData.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/RawData.meta rename to Assets/GameMain/Scripts/UI/Menu/RawData.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/UseCase.meta b/Assets/GameMain/Scripts/UI/Menu/UseCase.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/UseCase.meta rename to Assets/GameMain/Scripts/UI/Menu/UseCase.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/View.meta b/Assets/GameMain/Scripts/UI/Menu/View.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/View.meta rename to Assets/GameMain/Scripts/UI/Menu/View.meta diff --git a/Assets/GameMain/Scripts/UI/MenuScene/View/TestMenuForm.cs b/Assets/GameMain/Scripts/UI/Menu/View/TestMenuForm.cs similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/View/TestMenuForm.cs rename to Assets/GameMain/Scripts/UI/Menu/View/TestMenuForm.cs diff --git a/Assets/GameMain/Scripts/UI/MenuScene/View/TestMenuForm.cs.meta b/Assets/GameMain/Scripts/UI/Menu/View/TestMenuForm.cs.meta similarity index 100% rename from Assets/GameMain/Scripts/UI/MenuScene/View/TestMenuForm.cs.meta rename to Assets/GameMain/Scripts/UI/Menu/View/TestMenuForm.cs.meta diff --git a/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab b/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab new file mode 100644 index 0000000..cfbda0b --- /dev/null +++ b/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab @@ -0,0 +1,983 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2409096363260148444 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4169170613063708458} + - component: {fileID: 14351287788797483} + - component: {fileID: 8462322658551354788} + m_Layer: 5 + m_Name: CoinText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4169170613063708458 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2409096363260148444} + 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: 5356006041861078243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &14351287788797483 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2409096363260148444} + m_CullTransparentMesh: 1 +--- !u!114 &8462322658551354788 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2409096363260148444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u786C\u5E01\uFF1A20" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 99d811b0183246646a2ce8df996f4bca, type: 2} + m_sharedMaterial: {fileID: -1106088975554028259, guid: 99d811b0183246646a2ce8df996f4bca, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &3333286086788579657 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1726761505281868741} + - component: {fileID: 677960477362491995} + - component: {fileID: 8225082572338647983} + m_Layer: 5 + m_Name: LevelPhaseText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1726761505281868741 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3333286086788579657} + 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: 5356006041861078243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &677960477362491995 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3333286086788579657} + m_CullTransparentMesh: 1 +--- !u!114 &8225082572338647983 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3333286086788579657} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u6CE2\u6B21\uFF1A1/5" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 99d811b0183246646a2ce8df996f4bca, type: 2} + m_sharedMaterial: {fileID: -1106088975554028259, guid: 99d811b0183246646a2ce8df996f4bca, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &6494134981762327322 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8136671500363545760} + - component: {fileID: 389500655449199117} + m_Layer: 5 + m_Name: CombatInfoForm + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8136671500363545760 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6494134981762327322} + 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: 5356006041861078243} + - {fileID: 6325121653268560776} + m_Father: {fileID: 0} + 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 &389500655449199117 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6494134981762327322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b3971fa7b9e17b04a97d7f10d1472a80, type: 3} + m_Name: + m_EditorClassIdentifier: + _levelMetaText: {fileID: 7560939639246062472} + _levelPhaseText: {fileID: 8225082572338647983} + _coinText: {fileID: 8462322658551354788} + _pauseButton: {fileID: 7428757802831321808} + _endButton: {fileID: 5538219017489576212} +--- !u!1 &7271289036404717568 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4038891050023895669} + - component: {fileID: 8183419668552279710} + - component: {fileID: 7560939639246062472} + m_Layer: 5 + m_Name: LevelMetaText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4038891050023895669 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7271289036404717568} + 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: 5356006041861078243} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8183419668552279710 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7271289036404717568} + m_CullTransparentMesh: 1 +--- !u!114 &7560939639246062472 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7271289036404717568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: "\u5173\u5361\uFF1A\u5E73\u539F_1" + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 99d811b0183246646a2ce8df996f4bca, type: 2} + m_sharedMaterial: {fileID: -1106088975554028259, guid: 99d811b0183246646a2ce8df996f4bca, + type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 50 + m_fontSizeBase: 50 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 1 + m_VerticalAlignment: 256 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7280526033182194791 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5356006041861078243} + - component: {fileID: 731553503327873262} + m_Layer: 5 + m_Name: LeftTop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5356006041861078243 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7280526033182194791} + 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: 4038891050023895669} + - {fileID: 1726761505281868741} + - {fileID: 4169170613063708458} + m_Father: {fileID: 8136671500363545760} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 250, y: -250} + m_SizeDelta: {x: 400, y: 350} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &731553503327873262 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7280526033182194791} + 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: 1 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &8284139370021084558 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6325121653268560776} + - component: {fileID: 910542505150000154} + m_Layer: 5 + m_Name: RightTop + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6325121653268560776 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8284139370021084558} + 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: 5403492755541954141} + - {fileID: 7007208554693322137} + m_Father: {fileID: 8136671500363545760} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -350, y: -175} + m_SizeDelta: {x: 500, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &910542505150000154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8284139370021084558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + 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!1001 &6875337825489429358 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6325121653268560776} + m_Modifications: + - target: {fileID: 770565994539545022, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Name + value: PauseButton + objectReference: {fileID: 0} + - target: {fileID: 1920576543566152029, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_text + value: "\u6682\u505C\u6E38\u620F" + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onHover.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: OnPauseButtonClick + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: Geometry.UI.BattleInfoForm, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.x + value: 150 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.y + value: 150 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.y + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2307f223279813546a43b221ddd496cc, type: 3} +--- !u!224 &7007208554693322137 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + m_PrefabInstance: {fileID: 6875337825489429358} + m_PrefabAsset: {fileID: 0} +--- !u!114 &7428757802831321808 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + m_PrefabInstance: {fileID: 6875337825489429358} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5079836f95c2a44b96fa331487ebb70, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &8406408876340136106 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 6325121653268560776} + m_Modifications: + - target: {fileID: 770565994539545022, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Name + value: EndButton + objectReference: {fileID: 0} + - target: {fileID: 1920576543566152029, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_text + value: "\u7ED3\u675F\u6218\u6597" + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onHover.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 389500655449199117} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: OnEndButtonClick + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: GeometryTD.UI.CombatInfoForm, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: _onClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.x + value: 150 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.y + value: 150 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_SizeDelta.y + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7744090569424522082, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 2307f223279813546a43b221ddd496cc, type: 3} +--- !u!224 &5403492755541954141 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4491355866364659447, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + m_PrefabInstance: {fileID: 8406408876340136106} + m_PrefabAsset: {fileID: 0} +--- !u!114 &5538219017489576212 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4067353614215461310, guid: 2307f223279813546a43b221ddd496cc, + type: 3} + m_PrefabInstance: {fileID: 8406408876340136106} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5079836f95c2a44b96fa331487ebb70, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab.meta b/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab.meta new file mode 100644 index 0000000..3f21155 --- /dev/null +++ b/Assets/GameMain/UI/UIForms/CombatInfoForm.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ae0718a28b55e44bb4cdbb07cd9c0f3 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Launcher.unity b/Assets/Launcher.unity index 15e2617..1dc9f1b 100644 --- a/Assets/Launcher.unity +++ b/Assets/Launcher.unity @@ -751,7 +751,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 10f174db309f41b9abaf60bc291fbb2c, type: 3} m_Name: m_EditorClassIdentifier: - _referenceResolution: {x: 2560, y: 1600} + _referenceResolution: {x: 2868, y: 1320} _adaptUiCanvasToViewport: 1 _enableBlackMask: 1 _uiRoots: @@ -876,6 +876,134 @@ LightingSettings: m_PVRTiledBaking: 0 m_NumRaysToShootPerTexel: -1 m_RespectSceneVisibilityWhenBakingGI: 0 +--- !u!1 &1376238055 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1376238059} + - component: {fileID: 1376238058} + - component: {fileID: 1376238056} + m_Layer: 0 + m_Name: Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!114 &1376238056 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376238055} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!20 &1376238058 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376238055} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 7.5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1376238059 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1376238055} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1454214586 GameObject: m_ObjectHideFlags: 0 @@ -1292,3 +1420,4 @@ SceneRoots: m_Roots: - {fileID: 1852670053} - {fileID: 120093242} + - {fileID: 1376238059}