Main/System/Battle/BattleEffectMgr.cs
@@ -11,6 +11,7 @@ public void Init(BattleField _battleField) { Release(); battleField = _battleField; } @@ -112,6 +113,11 @@ public void HaveRest() { Release(); } public void Release() { List<int> fKeys = effectDict.Keys.ToList(); for (int i = 0; i < fKeys.Count; i++) @@ -127,22 +133,6 @@ else { effectPlayers.RemoveAt(0); } } } effectDict.Clear(); } public void Release() { foreach (var effect in effectDict) { foreach (var effectPlayer in effect.Value) { if (effectPlayer != null) { GameObject.DestroyImmediate(effectPlayer.gameObject); } } }