清理战斗
This commit is contained in:
parent
89497ab68e
commit
dc66b8833a
@ -15,6 +15,10 @@ function BattleUI:getPrefabPath()
|
|||||||
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUI:onClose()
|
||||||
|
self:clear()
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUI:onLoadRootComplete()
|
function BattleUI:onLoadRootComplete()
|
||||||
self:_display()
|
self:_display()
|
||||||
self:_addListeners()
|
self:_addListeners()
|
||||||
@ -264,4 +268,15 @@ function BattleUI:fallGrid(listInfo, callback)
|
|||||||
end
|
end
|
||||||
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
|
return BattleUI
|
||||||
Loading…
x
Reference in New Issue
Block a user