# Conflicts:
#	lua/app/ui/battle/battle_ui.lua
This commit is contained in:
xiekaidong 2023-04-12 21:03:40 +08:00
commit eb17b324c4

View File

@ -15,6 +15,10 @@ function BattleUI:getPrefabPath()
return "assets/prefabs/ui/battle/battle_ui.prefab"
end
function BattleUI:onClose()
self:clear()
end
function BattleUI:onLoadRootComplete()
self:_display()
self:_addListeners()
@ -407,4 +411,14 @@ function BattleUI:doCachePopAni(skillInfo, callback)
end)
end
function BattleUI:clear()
if self.alreadyClear then
return
end
self.alreadyClear = true
if self.battleNode then
self.battleNode:removeAllChildren()
end
end
return BattleUI