【战斗】修复战斗界面资源回收时报错
parent
355d843b30
commit
9dc9ca2b2a
|
|
@ -792,14 +792,14 @@ function this.AddDelayRecycleRes(path, go, delayTime, delayFunc)
|
|||
end
|
||||
|
||||
function this.RecycleAllDelayRes()
|
||||
|
||||
--立即回收延迟列表上的资源
|
||||
for k, v in pairs(this._delayRecycleList) do
|
||||
for i=1, #v do
|
||||
Util.SetGray(v[i], false)
|
||||
poolManager:UnLoadAsset(k, v[i], PoolManager.AssetType.GameObject)
|
||||
end
|
||||
this._delayRecycleList[k] = nil
|
||||
end
|
||||
this._delayRecycleList = {}
|
||||
end
|
||||
--++++++++++++++
|
||||
|
||||
|
|
|
|||
|
|
@ -891,6 +891,9 @@ function this:OnClose()
|
|||
delayRecycleList[k] = nil
|
||||
end
|
||||
|
||||
-- 回收所有延迟资源
|
||||
BattleManager.RecycleAllDelayRes()
|
||||
|
||||
BattlePool.Clear()
|
||||
poolManager:ClearPool()
|
||||
|
||||
|
|
@ -902,6 +905,7 @@ function this:OnClose()
|
|||
BattleManager.StopBattle()
|
||||
|
||||
this.ClearBattleEvent()
|
||||
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
|||
Loading…
Reference in New Issue