【战斗】修复战斗结束后立刻再进入战斗会报错卡死

dev_chengFeng
gaoxin 2021-12-13 16:25:09 +08:00
parent b5750526b2
commit 064505813a
2 changed files with 7 additions and 6 deletions

View File

@ -16,6 +16,7 @@ this.momItems = {}
function this.Init(poolRoot) function this.Init(poolRoot)
this.root = poolRoot this.root = poolRoot
this.momItems = {}
end end
function this.Register(type, item) function this.Register(type, item)
@ -69,13 +70,13 @@ function this.Clear()
end) end)
end end
this.pool = {} this.pool = {}
end
-- 销毁对象池
function this.Destroy()
this.Clear()
this.momItems = {} this.momItems = {}
end end
-- 销毁对象池
-- function this.Destroy()
-- this.Clear()
-- end
return BattlePool return BattlePool

View File

@ -1032,7 +1032,7 @@ function this:OnDestroy()
SubUIManager.Close(this.ElementalResonanceView) SubUIManager.Close(this.ElementalResonanceView)
SubUIManager.Close(this.ElementalResonanceView2) SubUIManager.Close(this.ElementalResonanceView2)
BattlePool.Destroy() -- BattlePool.Destroy()
-- 回收所有延迟资源 -- 回收所有延迟资源
BattleManager.RecycleAllDelayRes() BattleManager.RecycleAllDelayRes()
end end