diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_Battle.spriteatlasv2.meta b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_Battle.spriteatlasv2.meta index 814ce3de..4893fe3c 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_Battle.spriteatlasv2.meta +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_Battle.spriteatlasv2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 35f73e157d689ae44916c45f74a3370c +guid: 736bc06e2873e08418fef3194a34eeaf SpriteAtlasImporter: externalObjects: {} userData: diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_arrows.spriteatlasv2.meta b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_arrows.spriteatlasv2.meta index d330dd66..b91e1ec3 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_arrows.spriteatlasv2.meta +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_arrows.spriteatlasv2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ed51a84131b222945851b7ed062197da +guid: 30b2151baa80324468b12076c6025e5c SpriteAtlasImporter: externalObjects: {} userData: diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_bars.spriteatlasv2.meta b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_bars.spriteatlasv2.meta index 5b4656dc..d28f8de6 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_bars.spriteatlasv2.meta +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_bars.spriteatlasv2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e409725293d95d84aa5e0c943054a97d +guid: 7180c75b26a0aa046b5743fbddb78c45 SpriteAtlasImporter: externalObjects: {} userData: diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_buttons.spriteatlasv2.meta b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_buttons.spriteatlasv2.meta index ee2e8b91..f3b0ad8e 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_buttons.spriteatlasv2.meta +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_buttons.spriteatlasv2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 46f2b6a7c8d6e534b9c57f91f44c3208 +guid: d6c291e122fdd1b4f8338aa5a955cc67 SpriteAtlasImporter: externalObjects: {} userData: diff --git a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_window.spriteatlasv2.meta b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_window.spriteatlasv2.meta index 511cb4f1..9cb0cb1c 100644 --- a/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_window.spriteatlasv2.meta +++ b/UnityProject/Assets/AssetArt/Atlas/UIRaw_Atlas_window.spriteatlasv2.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 13eb6f2a63536ec49861839bfabae5b5 +guid: acf10131b937dab4c86d63939aecd2ab SpriteAtlasImporter: externalObjects: {} userData: diff --git a/UnityProject/Assets/AssetRaw/UI/UILoading.prefab b/UnityProject/Assets/AssetRaw/UI/UILoading.prefab index 9b6e1fd5..6eefc08a 100644 --- a/UnityProject/Assets/AssetRaw/UI/UILoading.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UILoading.prefab @@ -28,6 +28,7 @@ RectTransform: 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: 4142826567245113224} m_RootOrder: 0 @@ -60,6 +61,7 @@ MonoBehaviour: 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: @@ -102,6 +104,7 @@ RectTransform: 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: 4142826567245113224} m_RootOrder: 1 @@ -134,6 +137,7 @@ MonoBehaviour: 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: @@ -180,6 +184,7 @@ RectTransform: 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: 2380612195453094903} - {fileID: 6184545274827739511} @@ -228,4 +233,4 @@ MonoBehaviour: m_BlockingObjects: 0 m_BlockingMask: serializedVersion: 2 - m_Bits: 4294967295 + m_Bits: 55 diff --git a/UnityProject/Assets/AssetArt/UIAtlas.meta b/UnityProject/Assets/Editor.meta similarity index 77% rename from UnityProject/Assets/AssetArt/UIAtlas.meta rename to UnityProject/Assets/Editor.meta index 8ece20f6..a218c824 100644 --- a/UnityProject/Assets/AssetArt/UIAtlas.meta +++ b/UnityProject/Assets/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 80caf8bc3d0ac5b48a5cab7765a68205 +guid: 3b549395c8849674b9cafbbf4c694e57 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/UnityProject/Packages/YooAsset/Runtime/Properties.meta b/UnityProject/Assets/Editor/I2Localization.meta similarity index 77% rename from UnityProject/Packages/YooAsset/Runtime/Properties.meta rename to UnityProject/Assets/Editor/I2Localization.meta index dc77b70b..7b739cf6 100644 --- a/UnityProject/Packages/YooAsset/Runtime/Properties.meta +++ b/UnityProject/Assets/Editor/I2Localization.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2de5a58f37a4ae64e804f150144da809 +guid: 4c9eb26aee01e8643bd4e6dc965d3366 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/UnityProject/Assets/Editor/I2Localization/I2Languages.asset b/UnityProject/Assets/Editor/I2Localization/I2Languages.asset new file mode 100644 index 00000000..16a26b7d --- /dev/null +++ b/UnityProject/Assets/Editor/I2Localization/I2Languages.asset @@ -0,0 +1,40 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f0b0c553be8edd4682e9180fdd13e37, type: 3} + m_Name: I2Languages + m_EditorClassIdentifier: + mSource: + UserAgreesToHaveItOnTheScene: 0 + UserAgreesToHaveItInsideThePluginsFolder: 0 + GoogleLiveSyncIsUptoDate: 1 + mTerms: [] + CaseInsensitiveTerms: 0 + OnMissingTranslation: 1 + mTerm_AppName: + mLanguages: [] + IgnoreDeviceLanguage: 0 + _AllowUnloadingLanguages: 0 + Google_WebServiceURL: + Google_SpreadsheetKey: + Google_SpreadsheetName: + Google_LastUpdatedVersion: + Google_Password: change_this + GoogleUpdateFrequency: 3 + GoogleInEditorCheckFrequency: 2 + GoogleUpdateSynchronization: 1 + GoogleUpdateDelay: 0 + Assets: [] + Spreadsheet_LocalFileName: + Spreadsheet_LocalCSVSeparator: ',' + Spreadsheet_LocalCSVEncoding: utf-8 + Spreadsheet_SpecializationAsRows: 1 + Spreadsheet_SortRows: 1 diff --git a/UnityProject/Assets/TEngine/AssetSetting/AssetBundleBuilderSetting.asset.meta b/UnityProject/Assets/Editor/I2Localization/I2Languages.asset.meta similarity index 79% rename from UnityProject/Assets/TEngine/AssetSetting/AssetBundleBuilderSetting.asset.meta rename to UnityProject/Assets/Editor/I2Localization/I2Languages.asset.meta index 94c34124..c099f85f 100644 --- a/UnityProject/Assets/TEngine/AssetSetting/AssetBundleBuilderSetting.asset.meta +++ b/UnityProject/Assets/Editor/I2Localization/I2Languages.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a363de58f5d6e9e438b2b9a692187f6e +guid: f069f2f03dfa55843a74dedc551eefb2 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteBehaviour.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteBehaviour.cs index ab03755b..6329105b 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteBehaviour.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteBehaviour.cs @@ -171,7 +171,7 @@ namespace GameLogic CurState = false; } - public override void OnDestroy() + protected override void OnDestroy() { RemoveNotifyBind(); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteMgr.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteMgr.cs index 3a02c78e..f2ee60f7 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteMgr.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteMgr.cs @@ -516,7 +516,7 @@ namespace GameLogic { if (paramList is { Count: > 0 }) { - return false; + return true; } return false; diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteWidget.cs index 9313425d..9dd9384c 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteWidget.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/RedNote/RedNoteWidget.cs @@ -7,14 +7,14 @@ namespace GameLogic public class RedNoteWidget : UIWidget { #region 脚本工具生成的代码 - public override void ScriptGenerator() + protected override void ScriptGenerator() { } #endregion private Image m_image; public RedNoteBehaviour m_redNote; - public override void OnCreate() + protected override void OnCreate() { m_redNote = CreateWidget(gameObject); m_image = gameObject.GetComponent(); @@ -42,10 +42,10 @@ namespace GameLogic public void SetSprite(string sprite) { - m_image.SetSprite(sprite); + // m_image.SetSprite(sprite); } - public override void OnUpdate() + protected override void OnUpdate() { /*if (!m_redNote.CurState) { diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/GridView/LoopGridView.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/GridView/LoopGridView.cs index 960ded7c..3ed3eea8 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/GridView/LoopGridView.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/GridView/LoopGridView.cs @@ -377,7 +377,7 @@ namespace GameLogic private GridItemPool TryCreateItemPool(string itemPrefabName) { string resPath = itemPrefabName; - GameObject go = GameModule.Resource.LoadAsset(resPath, _containerTrans); + GameObject go = GameModule.Resource.LoadGameObject(resPath, parent: _containerTrans); if (go != null) { go.SetActive(false); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/ListView/LoopListView.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/ListView/LoopListView.cs index ee63b6a9..ef82bdf2 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/ListView/LoopListView.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SuperScrollView/Scripts/ListView/LoopListView.cs @@ -669,7 +669,7 @@ namespace GameLogic private ItemPool TryCreateItemPool(string itemPrefabName) { string resPath = itemPrefabName; - GameObject go = GameModule.Resource.LoadAsset(resPath, _containerTrans); + GameObject go = GameModule.Resource.LoadGameObject(resPath, parent: _containerTrans); if (go != null) { go.SetActive(false); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SwitchPage/SwitchTabItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SwitchPage/SwitchTabItem.cs index c3c59d94..e9c4e186 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SwitchPage/SwitchTabItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/SwitchPage/SwitchTabItem.cs @@ -55,7 +55,7 @@ namespace GameLogic } } - public override void BindMemberProperty() + protected override void BindMemberProperty() { m_selectNode = FindChild("SelectNode"); m_noSelectNode = FindChild("NoSelectNode"); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs index 07f71276..cb7577b0 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UIListBase.cs @@ -86,7 +86,7 @@ namespace GameLogic { } - public override void RegisterEvent() + protected override void RegisterEvent() { base.RegisterEvent(); AddSelectEvt(); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs index 14183fd0..e0f35911 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopGridWidget.cs @@ -30,19 +30,19 @@ namespace GameLogic /// public List items => m_items; - public override void BindMemberProperty() + protected override void BindMemberProperty() { base.BindMemberProperty(); LoopRectView = rectTransform.GetComponent(); } - public override void OnCreate() + protected override void OnCreate() { base.OnCreate(); LoopRectView.InitGridView(0, OnGetItemByIndex); } - public override void OnDestroy() + protected override void OnDestroy() { base.OnDestroy(); m_itemCache.Clear(); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs index c20af44d..dab9cdb8 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListViewWidget.cs @@ -10,13 +10,13 @@ namespace GameLogic private GameFrameworkDictionary m_itemCache = new GameFrameworkDictionary(); - public override void BindMemberProperty() + protected override void BindMemberProperty() { base.BindMemberProperty(); LoopRectView = this.rectTransform.GetComponent(); } - public override void OnDestroy() + protected override void OnDestroy() { base.OnDestroy(); m_itemCache.Clear(); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs index e09f151f..16e17141 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/UI/Widget/UILoopListWidget.cs @@ -31,19 +31,19 @@ namespace GameLogic /// public List items => m_items; - public override void BindMemberProperty() + protected override void BindMemberProperty() { base.BindMemberProperty(); LoopRectView = rectTransform.GetComponent(); } - public override void OnCreate() + protected override void OnCreate() { base.OnCreate(); LoopRectView.InitListView(0, OnGetItemByIndex); } - public override void OnDestroy() + protected override void OnDestroy() { base.OnDestroy(); m_itemCache.Clear(); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo.meta b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo.meta index 529ee80d..879dd53a 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo.meta +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d21fceb7ec2e3e04ab967b9273644e57 +guid: 02e23552959dc0e4eaf254fd6c5c21bf folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityAsteroid.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityAsteroid.cs index b6281e3d..2218d7c9 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityAsteroid.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityAsteroid.cs @@ -25,7 +25,7 @@ public class EntityAsteroid : MonoBehaviour if (name.StartsWith("player")) { GameEvent.Send(ActorEventDefine.AsteroidExplosion,this.transform.position, this.transform.rotation); - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } void OnTriggerExit(Collider other) @@ -33,7 +33,7 @@ public class EntityAsteroid : MonoBehaviour var name = other.gameObject.name; if (name.StartsWith("Boundary")) { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityBullet.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityBullet.cs index 79ecd34a..c4c95458 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityBullet.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityBullet.cs @@ -1,3 +1,4 @@ +using GameLogic; using TEngine; using UnityEngine; @@ -28,7 +29,7 @@ public class EntityBullet : MonoBehaviour { if (name.StartsWith("enemy") == false) { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } @@ -36,7 +37,7 @@ public class EntityBullet : MonoBehaviour { if (name.StartsWith("player") == false) { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } } @@ -45,7 +46,7 @@ public class EntityBullet : MonoBehaviour var name = other.gameObject.name; if (name.StartsWith("Boundary")) { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEffect.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEffect.cs index 88ab223a..81b804df 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEffect.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEffect.cs @@ -1,4 +1,5 @@ -using TEngine; +using GameLogic; +using TEngine; using UnityEngine; public class EntityEffect : MonoBehaviour @@ -11,6 +12,6 @@ public class EntityEffect : MonoBehaviour } private void DelayDestroy() { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEnemy.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEnemy.cs index f99595c7..2a8ad7f3 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEnemy.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityEnemy.cs @@ -69,7 +69,7 @@ public class EntityEnemy : MonoBehaviour if (name.StartsWith("player")) { GameEvent.Send(ActorEventDefine.EnemyDead,this.transform.position, this.transform.rotation); - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } void OnTriggerExit(Collider other) @@ -77,7 +77,7 @@ public class EntityEnemy : MonoBehaviour var name = other.gameObject.name; if (name.StartsWith("Boundary")) { - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityPlayer.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityPlayer.cs index 8a0fad67..6b2bd8a7 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityPlayer.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/Actor/EntityPlayer.cs @@ -51,7 +51,7 @@ public class EntityPlayer : MonoBehaviour if (name.StartsWith("enemy") || name.StartsWith("asteroid")) { GameEvent.Send(ActorEventDefine.PlayerDead,transform.position, transform.rotation); - GameModule.Resource.FreeGameObject(this.gameObject); + PoolManager.Instance.PushGameObject(this.gameObject); } } } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/BattleSystem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/BattleSystem.cs index 80091480..17c07d5e 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/BattleSystem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/BattleSystem.cs @@ -11,239 +11,241 @@ using Random = UnityEngine.Random; /// 战斗房间 /// [Update] -public class BattleSystem:BehaviourSingleton +public class BattleSystem : BehaviourSingleton { - private enum ESteps - { - None, - Ready, - Spawn, - WaitSpawn, - WaitWave, - GameOver, - } + private enum ESteps + { + None, + Ready, + Spawn, + WaitSpawn, + WaitWave, + GameOver, + } - private GameObject _roomRoot; + private GameObject _roomRoot; - // 关卡参数 - private const int EnemyCount = 10; - private const int EnemyScore = 10; - private const int AsteroidScore = 1; - private readonly Vector3 _spawnValues = new Vector3(6, 0, 20); - private readonly string[] _entityLocations = new string[] - { - "asteroid01", "asteroid02", "asteroid03", "enemy_ship" - }; + // 关卡参数 + private const int EnemyCount = 10; + private const int EnemyScore = 10; + private const int AsteroidScore = 1; + private readonly Vector3 _spawnValues = new Vector3(6, 0, 20); - private ESteps _steps = ESteps.None; - private int _totalScore = 0; - private int _waveSpawnCount = 0; - // - // private UniTimer _startWaitTimer = UniTimer.CreateOnceTimer(1f); - // private UniTimer _spawnWaitTimer = UniTimer.CreateOnceTimer(0.75f); - // private UniTimer _waveWaitTimer = UniTimer.CreateOnceTimer(4f); + private readonly string[] _entityLocations = new string[] + { + "asteroid01", "asteroid02", "asteroid03", "enemy_ship" + }; - private float _startWaitTimer = 1f; - private float _spawnWaitTimer = 0.75f; - private float _waveWaitTimer = 4f; + private ESteps _steps = ESteps.None; + private int _totalScore = 0; - /// - /// 加载房间 - /// - public async UniTaskVoid LoadRoom() - { - _startWaitTimer = 1f; - - await UniTask.Yield(); - // 创建房间根对象 - _roomRoot = new GameObject("BattleRoom"); + private int _waveSpawnCount = 0; + // + // private UniTimer _startWaitTimer = UniTimer.CreateOnceTimer(1f); + // private UniTimer _spawnWaitTimer = UniTimer.CreateOnceTimer(0.75f); + // private UniTimer _waveWaitTimer = UniTimer.CreateOnceTimer(4f); - // 加载背景音乐 - GameModule.Audio.Play(AudioType.Music, "music_background", true); + private float _startWaitTimer = 1f; + private float _spawnWaitTimer = 0.75f; + private float _waveWaitTimer = 4f; - // 创建玩家实体对象 - var handle = GameModule.Resource.LoadAsset("player_ship", _roomRoot.transform); - var entity = handle.GetComponent(); + /// + /// 加载房间 + /// + public async UniTaskVoid LoadRoom() + { + _startWaitTimer = 1f; - // 显示战斗界面 - GameModule.UI.ShowUIAsync(); + await UniTask.Yield(); + // 创建房间根对象 + _roomRoot = new GameObject("BattleRoom"); - // 监听游戏事件 - GameEvent.AddEventListener(ActorEventDefine.PlayerDead,OnPlayerDead); - GameEvent.AddEventListener(ActorEventDefine.EnemyDead,OnEnemyDead); - GameEvent.AddEventListener(ActorEventDefine.AsteroidExplosion,OnAsteroidExplosion); - GameEvent.AddEventListener(ActorEventDefine.PlayerFireBullet,OnPlayerFireBullet); - GameEvent.AddEventListener(ActorEventDefine.EnemyFireBullet,OnEnemyFireBullet); + // 加载背景音乐 + GameModule.Audio.Play(AudioType.Music, "music_background", true); - _steps = ESteps.Ready; - } - - /// - /// 销毁房间 - /// - public void DestroyRoom() - { - // 加载背景音乐 - GameModule.Audio.Stop(AudioType.Music, true); + // 创建玩家实体对象 + var handle = PoolManager.Instance.GetGameObject("player_ship",parent: _roomRoot.transform); + var entity = handle.GetComponent(); - // if (_entitySpawner != null) - // { - // _entitySpawner.DestroyAll(true); - // } + // 显示战斗界面 + GameModule.UI.ShowUIAsync(); - if (_roomRoot != null) - Object.Destroy(_roomRoot); + // 监听游戏事件 + GameEvent.AddEventListener(ActorEventDefine.PlayerDead, OnPlayerDead); + GameEvent.AddEventListener(ActorEventDefine.EnemyDead, OnEnemyDead); + GameEvent.AddEventListener(ActorEventDefine.AsteroidExplosion, OnAsteroidExplosion); + GameEvent.AddEventListener(ActorEventDefine.PlayerFireBullet, OnPlayerFireBullet); + GameEvent.AddEventListener(ActorEventDefine.EnemyFireBullet, OnEnemyFireBullet); - GameModule.UI.CloseWindow(); - - // 监听游戏事件 - GameEvent.RemoveEventListener(ActorEventDefine.PlayerDead,OnPlayerDead); - GameEvent.RemoveEventListener(ActorEventDefine.EnemyDead,OnEnemyDead); - GameEvent.RemoveEventListener(ActorEventDefine.AsteroidExplosion,OnAsteroidExplosion); - GameEvent.RemoveEventListener(ActorEventDefine.PlayerFireBullet,OnPlayerFireBullet); - GameEvent.RemoveEventListener(ActorEventDefine.EnemyFireBullet,OnEnemyFireBullet); - } + _steps = ESteps.Ready; + } - public override void Update() - { - UpdateRoom(); - } + /// + /// 销毁房间 + /// + public void DestroyRoom() + { + // 加载背景音乐 + GameModule.Audio.Stop(AudioType.Music, true); - /// - /// 更新房间 - /// - public void UpdateRoom() - { - if (_steps == ESteps.None || _steps == ESteps.GameOver) - return; + // if (_entitySpawner != null) + // { + // _entitySpawner.DestroyAll(true); + // } - if (_steps == ESteps.Ready) - { - _startWaitTimer -= Time.deltaTime; - if (_startWaitTimer <= 0) - { - _steps = ESteps.Spawn; - } - } + if (_roomRoot != null) + Object.Destroy(_roomRoot); - if (_steps == ESteps.Spawn) - { - var enemyLocation = _entityLocations[Random.Range(0, 4)]; - Vector3 spawnPosition = new Vector3(Random.Range(-_spawnValues.x, _spawnValues.x), _spawnValues.y, _spawnValues.z); - Quaternion spawnRotation = Quaternion.identity; + GameModule.UI.CloseUI(); - if (enemyLocation == "enemy_ship") - { - // 生成敌人实体 - var gameObject = GameModule.Resource.LoadAsset(enemyLocation, _roomRoot.transform); - gameObject.transform.position = spawnPosition; - gameObject.transform.rotation = spawnRotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); - } - else - { - // 生成小行星实体 - var gameObject = GameModule.Resource.LoadAsset(enemyLocation, _roomRoot.transform); - gameObject.transform.position = spawnPosition; - gameObject.transform.rotation = spawnRotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); - } + // 监听游戏事件 + GameEvent.RemoveEventListener(ActorEventDefine.PlayerDead, OnPlayerDead); + GameEvent.RemoveEventListener(ActorEventDefine.EnemyDead, OnEnemyDead); + GameEvent.RemoveEventListener(ActorEventDefine.AsteroidExplosion, OnAsteroidExplosion); + GameEvent.RemoveEventListener(ActorEventDefine.PlayerFireBullet, OnPlayerFireBullet); + GameEvent.RemoveEventListener(ActorEventDefine.EnemyFireBullet, OnEnemyFireBullet); + } - _waveSpawnCount++; - if (_waveSpawnCount >= EnemyCount) - { - _steps = ESteps.WaitWave; - } - else - { - _steps = ESteps.WaitSpawn; - } - } + public override void Update() + { + UpdateRoom(); + } - if (_steps == ESteps.WaitSpawn) - { - _spawnWaitTimer -= Time.deltaTime; - if (_spawnWaitTimer <= 0) - { - _spawnWaitTimer = 0.75f; - _steps = ESteps.Spawn; - } - } + /// + /// 更新房间 + /// + public void UpdateRoom() + { + if (_steps == ESteps.None || _steps == ESteps.GameOver) + return; - if (_steps == ESteps.WaitWave) - { - _waveWaitTimer -= Time.deltaTime; - if (_waveWaitTimer <= 0) - { - _waveWaitTimer = 4f; - _waveSpawnCount = 0; - _steps = ESteps.Spawn; - } - } - } + if (_steps == ESteps.Ready) + { + _startWaitTimer -= Time.deltaTime; + if (_startWaitTimer <= 0) + { + _steps = ESteps.Spawn; + } + } + + if (_steps == ESteps.Spawn) + { + var enemyLocation = _entityLocations[Random.Range(0, 4)]; + Vector3 spawnPosition = new Vector3(Random.Range(-_spawnValues.x, _spawnValues.x), _spawnValues.y, _spawnValues.z); + Quaternion spawnRotation = Quaternion.identity; + + if (enemyLocation == "enemy_ship") + { + // 生成敌人实体 + var gameObject = PoolManager.Instance.GetGameObject(enemyLocation,parent: _roomRoot.transform); + gameObject.transform.position = spawnPosition; + gameObject.transform.rotation = spawnRotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); + } + else + { + // 生成小行星实体 + var gameObject = PoolManager.Instance.GetGameObject(enemyLocation,parent: _roomRoot.transform); + gameObject.transform.position = spawnPosition; + gameObject.transform.rotation = spawnRotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); + } + + _waveSpawnCount++; + if (_waveSpawnCount >= EnemyCount) + { + _steps = ESteps.WaitWave; + } + else + { + _steps = ESteps.WaitSpawn; + } + } + + if (_steps == ESteps.WaitSpawn) + { + _spawnWaitTimer -= Time.deltaTime; + if (_spawnWaitTimer <= 0) + { + _spawnWaitTimer = 0.75f; + _steps = ESteps.Spawn; + } + } + + if (_steps == ESteps.WaitWave) + { + _waveWaitTimer -= Time.deltaTime; + if (_waveWaitTimer <= 0) + { + _waveWaitTimer = 4f; + _waveSpawnCount = 0; + _steps = ESteps.Spawn; + } + } + } - #region 接收事件 + #region 接收事件 - private void OnPlayerDead(Vector3 position,Quaternion rotation) - { - // 创建爆炸效果 - var gameObject = GameModule.Resource.LoadAsset("explosion_player", _roomRoot.transform); - gameObject.transform.position = position; - gameObject.transform.rotation = rotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); - _steps = ESteps.GameOver; - GameEvent.Send(ActorEventDefine.GameOver); - } + private void OnPlayerDead(Vector3 position, Quaternion rotation) + { + // 创建爆炸效果 + var gameObject = PoolManager.Instance.GetGameObject("explosion_player",parent: _roomRoot.transform); + gameObject.transform.position = position; + gameObject.transform.rotation = rotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); + _steps = ESteps.GameOver; + GameEvent.Send(ActorEventDefine.GameOver); + } - private void OnEnemyDead(Vector3 position,Quaternion rotation) - { - // 创建爆炸效果 - var gameObject = GameModule.Resource.LoadAsset("explosion_enemy", _roomRoot.transform); - gameObject.transform.position = position; - gameObject.transform.rotation = rotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); + private void OnEnemyDead(Vector3 position, Quaternion rotation) + { + // 创建爆炸效果 + var gameObject = PoolManager.Instance.GetGameObject("explosion_enemy",parent: _roomRoot.transform); + gameObject.transform.position = position; + gameObject.transform.rotation = rotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); - _totalScore += EnemyScore; - GameEvent.Send(ActorEventDefine.ScoreChange,_totalScore); - } + _totalScore += EnemyScore; + GameEvent.Send(ActorEventDefine.ScoreChange, _totalScore); + } - private void OnAsteroidExplosion(Vector3 position,Quaternion rotation) - { - // 创建爆炸效果 - var gameObject = GameModule.Resource.LoadAsset("explosion_asteroid", _roomRoot.transform); - gameObject.transform.position = position; - gameObject.transform.rotation = rotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); + private void OnAsteroidExplosion(Vector3 position, Quaternion rotation) + { + // 创建爆炸效果 + var gameObject = PoolManager.Instance.GetGameObject("explosion_asteroid",parent: _roomRoot.transform); + gameObject.transform.position = position; + gameObject.transform.rotation = rotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); - _totalScore += AsteroidScore; - GameEvent.Send(ActorEventDefine.ScoreChange,_totalScore); - } + _totalScore += AsteroidScore; + GameEvent.Send(ActorEventDefine.ScoreChange, _totalScore); + } - private void OnPlayerFireBullet(Vector3 position,Quaternion rotation) - { - // 创建子弹实体 - var gameObject = GameModule.Resource.LoadAsset("player_bullet", _roomRoot.transform); - gameObject.transform.position = position; - gameObject.transform.rotation = rotation; - var entity = gameObject.GetComponent(); - entity.InitEntity(); - } - - private void OnEnemyFireBullet(Vector3 position,Quaternion rotation) - { - // 创建子弹实体 - var gameObject = GameModule.Resource.LoadAsset("enemy_bullet", _roomRoot.transform); + private void OnPlayerFireBullet(Vector3 position, Quaternion rotation) + { + // 创建子弹实体 + var gameObject = PoolManager.Instance.GetGameObject("player_bullet",parent: _roomRoot.transform); gameObject.transform.position = position; gameObject.transform.rotation = rotation; var entity = gameObject.GetComponent(); entity.InitEntity(); - } + } - #endregion + private void OnEnemyFireBullet(Vector3 position, Quaternion rotation) + { + // 创建子弹实体 + var gameObject = PoolManager.Instance.GetGameObject("enemy_bullet",parent: _roomRoot.transform); + gameObject.transform.position = position; + gameObject.transform.rotation = rotation; + var entity = gameObject.GetComponent(); + entity.InitEntity(); + } + + #endregion } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs new file mode 100644 index 00000000..2f732011 --- /dev/null +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using TEngine; +using UnityEngine; + +namespace GameLogic +{ + public class PoolManager : MonoBehaviour + { + private static PoolManager _instance; + + public static PoolManager Instance + { + get + { + if (_instance == null) + { + _instance = FindObjectOfType(); + } + + if (_instance == null) + { + GameObject gameObject = new GameObject(); + gameObject.name = nameof(PoolManager); + _instance = gameObject.AddComponent(); + _instance.poolRootObj = gameObject; + DontDestroyOnLoad(_instance); + } + + return _instance; + } + } + + [SerializeField] private GameObject poolRootObj; + public Dictionary gameObjectPoolDic = new Dictionary(); + public Dictionary objectPoolDic = new Dictionary(); + + public GameObject GetGameObject(string assetName, Transform parent = null) + { + GameObject obj = null; + if (gameObjectPoolDic.TryGetValue(assetName, out var gameObjectPoolData) && gameObjectPoolData.poolQueue.Count > 0) + { + obj = gameObjectPoolData.GetObj(parent); + } + + if (obj == null) + { + obj = GameModule.Resource.LoadGameObject(assetName, parent: parent); + obj.name = assetName; + } + return obj; + } + + public void PushGameObject(GameObject obj) + { + string objName = obj.name; + if (gameObjectPoolDic.TryGetValue(objName, out var gameObjectPoolData)) + { + gameObjectPoolData.PushObj(obj); + } + else + { + gameObjectPoolDic.Add(objName, new GameObjectPoolData(obj, poolRootObj)); + } + } + + public T GetObject() where T : class, new() + { + return CheckObjectCache() ? (T)objectPoolDic[typeof(T).FullName].GetObj() : new T(); + } + + public void PushObject(object obj) + { + string fullName = obj.GetType().FullName; + if (objectPoolDic.ContainsKey(fullName)) + { + objectPoolDic[fullName].PushObj(obj); + } + else + { + objectPoolDic.Add(fullName, new ObjectPoolData(obj)); + } + } + + private bool CheckObjectCache() + { + string fullName = typeof(T).FullName; + return fullName != null && objectPoolDic.ContainsKey(fullName) && objectPoolDic[fullName].poolQueue.Count > 0; + } + + public void Clear(bool clearGameObject = true, bool clearCObject = true) + { + if (clearGameObject) + { + for (int index = 0; index < poolRootObj.transform.childCount; ++index) + { + Destroy(poolRootObj.transform.GetChild(index).gameObject); + } + gameObjectPoolDic.Clear(); + } + + if (!clearCObject) + { + return; + } + objectPoolDic.Clear(); + } + + public void ClearAllGameObject() => Clear(clearCObject: false); + + public void ClearGameObject(string prefabName) + { + GameObject obj = poolRootObj.transform.Find(prefabName).gameObject; + if (obj == null) + { + return; + } + + Destroy(obj); + gameObjectPoolDic.Remove(prefabName); + } + + public void ClearGameObject(GameObject prefab) => ClearGameObject(prefab.name); + + public void ClearAllObject() => Clear(false); + + public void ClearObject() => objectPoolDic.Remove(typeof(T).FullName); + + public void ClearObject(Type type) => objectPoolDic.Remove(type.FullName); + } + + public class ObjectPoolData + { + public readonly Queue poolQueue = new Queue(); + + public ObjectPoolData(object obj) => PushObj(obj); + + public void PushObj(object obj) => poolQueue.Enqueue(obj); + + public object GetObj() => poolQueue.Dequeue(); + } + + public class GameObjectPoolData + { + public readonly GameObject fatherObj; + public readonly Queue poolQueue; + + public GameObjectPoolData(GameObject obj, GameObject poolRootObj) + { + fatherObj = new GameObject(obj.name); + fatherObj.transform.SetParent(poolRootObj.transform); + poolQueue = new Queue(); + PushObj(obj); + } + + public GameObjectPoolData(GameObject fatherObj) + { + this.fatherObj = fatherObj; + } + + public void PushObj(GameObject obj) + { + poolQueue.Enqueue(obj); + obj.transform.SetParent(fatherObj.transform); + obj.SetActive(false); + } + + public GameObject GetObj(Transform parent = null) + { + GameObject go = poolQueue.Dequeue(); + go.SetActive(true); + go.transform.SetParent(parent); + if (parent == null) + { + UnityEngine.SceneManagement.SceneManager.MoveGameObjectToScene(go, UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + + return go; + } + } +} \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs.meta b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs.meta new file mode 100644 index 00000000..558e260e --- /dev/null +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/PoolManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6793af44177448799777835de5cc4a53 +timeCreated: 1710746480 \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/UI/UIBattleWindow.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/UI/UIBattleWindow.cs index 7695b0bb..6b9d2a74 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/UI/UIBattleWindow.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Demo/UI/UIBattleWindow.cs @@ -15,7 +15,7 @@ namespace GameLogic private Button m_btnRestart; private Button m_btnHome; - public override void ScriptGenerator() + protected override void ScriptGenerator() { m_textScore = FindChildComponent("ScoreView/m_textScore"); m_goOverView = FindChild("m_goOverView").gameObject; @@ -27,13 +27,13 @@ namespace GameLogic #endregion - public override void RegisterEvent() + protected override void RegisterEvent() { AddUIEvent(ActorEventDefine.ScoreChange, OnScoreChange); AddUIEvent(ActorEventDefine.GameOver, OnGameOver); } - public override void OnRefresh() + protected override void OnRefresh() { m_textScore.text = "Score : 0"; m_goOverView.SetActive(false); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs index 792b16e3..70541751 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameApp.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Reflection; using Cysharp.Threading.Tasks; using GameBase; +using GameLogic; using TEngine; /// diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef index 10bae9a9..05c00009 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/GameLogic.asmdef @@ -3,13 +3,11 @@ "rootNamespace": "GameLogic", "references": [ "GUID:6055be8ebefd69e48b49212b09b47b2f", - "GUID:15fc0a57446b3144c949da3e2b9737a9", "GUID:cbb0d51b565003841ae81cdbaf747114", "GUID:8f58f15387c7a6f4fad9857024eb47f7", "GUID:24c092aee38482f4e80715eaa8148782", - "GUID:e34a5702dd353724aa315fb8011f08c3", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:2b91a2c0e3055f54a8aab905c4163009" + "GUID:e34a5702dd353724aa315fb8011f08c3" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef b/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef index 9f0945a5..9435f03f 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef +++ b/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto.asmdef @@ -2,12 +2,9 @@ "name": "GameProto", "rootNamespace": "", "references": [ - "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:cbb0d51b565003841ae81cdbaf747114", "GUID:24c092aee38482f4e80715eaa8148782", - "GUID:756335c0388f7114790e504ed368ae1d", - "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:e34a5702dd353724aa315fb8011f08c3" + "GUID:f51ebe6a0ceec4240a699833d6309b23" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto_Empty.cs b/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto_Empty.cs deleted file mode 100644 index 8812ec11..00000000 --- a/UnityProject/Assets/GameScripts/HotFix/GameProto/GameProto_Empty.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace GameProto -{ - public class GameProto_Empty - { - - } -} \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadMgr.cs b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadMgr.cs index 9ba6b465..e5d014bd 100644 --- a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadMgr.cs +++ b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadMgr.cs @@ -56,8 +56,8 @@ namespace GameMain /// public static void HideAll() { - GameModule.UI.CloseWindow(); - GameModule.UI.CloseWindow(); + GameModule.UI.CloseUI(); + GameModule.UI.CloseUI(); } } } \ No newline at end of file diff --git a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs index a5249dc8..80b91729 100644 --- a/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs +++ b/UnityProject/Assets/GameScripts/Main/Launcher/Scripts/UI/UILoadTip.cs @@ -25,7 +25,7 @@ namespace GameMain private Text m_textInfo; private Button m_btnIgnore; private Button m_btnUpdate; - public override void ScriptGenerator() + protected override void ScriptGenerator() { m_btnPackage = FindChildComponent