diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs index 88b25303..c12d6df4 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Actor/ActorHItem.cs @@ -42,12 +42,20 @@ namespace GameLogic private Dictionary> m_Buffs = new Dictionary>(); //自身Buff列表 + private int timerId = -1; + protected override void OnCreate() { base.OnCreate(); - GameModule.Timer.AddTimer(TimerHandler, 0.01f, true); + timerId = GameModule.Timer.AddTimer(TimerHandler, 0.01f, true); + } + + protected override void OnDestroy() + { + base.OnDestroy(); + GameModule.Timer.RemoveTimer(timerId); } private void TimerHandler(object[] e) @@ -389,6 +397,11 @@ namespace GameLogic private void LoadTextureMatRes(int key) { + if (this.gameObject == null) + { + return; + } + // 先隐藏其他 for (int i = 1; i < m_rectCar.childCount; i++) { diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 063c5829..67757be7 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -908,6 +908,7 @@ namespace GameLogic m_TeamSortList.Clear(); + m_DicTeamList.Clear(); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs index 2fe288de..34634295 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs @@ -70,16 +70,14 @@ namespace GameLogic m_loopListView_View.RefreshAllShownItem(); } - protected override void Close() + + protected override void OnDestroy() { - base.Close(); - - + base.OnDestroy(); Log.Debug("UIGameRankForm Close"); DataGameSceneManager.Instance.OnRestData(); } - LoopListViewItem OnGetItemByIndex(LoopListView listView, int index) { if (index >= m_PlayRankDatas.Count)