【战斗】====战斗gm报错修改
parent
7c1a3caa5f
commit
d9f1670993
|
|
@ -73,6 +73,16 @@ function this.Clear()
|
|||
this.momItems = {}
|
||||
end
|
||||
|
||||
function this.Clear2()
|
||||
for _, st in pairs(this.pool) do
|
||||
st:Foreach(function(item)
|
||||
destroy(item)
|
||||
end)
|
||||
end
|
||||
this.pool = {}
|
||||
--this.momItems = {}
|
||||
end
|
||||
|
||||
-- 销毁对象池
|
||||
-- function this.Destroy()
|
||||
-- this.Clear()
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ function this:BindEvent()
|
|||
_IsStart = false
|
||||
this.RoleSkillOption:SetActive(false)
|
||||
BattleView.Clear()
|
||||
BattleView:OnClose()
|
||||
BattleView:OnClose2()
|
||||
|
||||
BattleView.InitBattleEvent()
|
||||
this.RefreshAllRoleShow()
|
||||
|
|
|
|||
|
|
@ -1023,6 +1023,45 @@ function this:OnClose()
|
|||
this.ClearBattleEvent()
|
||||
|
||||
|
||||
end
|
||||
|
||||
function this:OnClose2()
|
||||
|
||||
-- 回收所有延迟资源
|
||||
BattleManager.RecycleAllDelayRes()
|
||||
--
|
||||
FixedUpdateBeat:Remove(this.OnUpdate, self)
|
||||
-- 清空
|
||||
this.Clear()
|
||||
for _, v in pairs(tbRoleDispose) do
|
||||
v:Dispose()
|
||||
end
|
||||
tbRoleDispose = {}
|
||||
for _, v in pairs(tbMonsterDispose) do
|
||||
v:Dispose()
|
||||
end
|
||||
tbMonsterDispose = {}
|
||||
|
||||
for k, v in pairs(delayRecycleList) do
|
||||
for i=1, #v do
|
||||
poolManager:UnLoadAsset(k, v[i], PoolManager.AssetType.GameObject)
|
||||
end
|
||||
delayRecycleList[k] = nil
|
||||
end
|
||||
|
||||
BattlePool.Clear2()
|
||||
poolManager:ClearPool()
|
||||
|
||||
this.mySkillCast:SetActive(false)
|
||||
this.enemySkillCast:SetActive(false)
|
||||
this.lingshouCastUp:SetActive(false)
|
||||
this.lingshouCastDown:SetActive(false)
|
||||
--
|
||||
BattleManager.StopBattle()
|
||||
|
||||
this.ClearBattleEvent()
|
||||
|
||||
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
|||
Loading…
Reference in New Issue