From 754bf06d69180522f75ca53d6c452b4ed8f06b51 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 21 Apr 2023 21:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E5=A5=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 18 +++++++++++++++--- lua/app/ui/battle/battle_ui.lua | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index c3af3d4b..7092547c 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -392,14 +392,26 @@ function BattleController:enterEliminationBegin() -- end -- end, 2) - self:enterElimination() + self:enterElimination(true) end end) end -function BattleController:enterElimination() +function BattleController:enterElimination(needDelay) + if self.showSelectSkillSid then + ModuleManager.BattleManager:unscheduleGlobal(self.showSelectSkillSid) + self.showSelectSkillSid = nil + end + if self.battleData:useAddlvCount() then - ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList()) + if needDelay then + self.showSelectSkillSid = ModuleManager.BattleManager:performWithDelayGlobal(function() + ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList()) + self.showSelectSkillSid = nil + end, 1) + else + ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList()) + end else self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION end diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index b2ee218a..ddcac89d 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -796,7 +796,7 @@ function BattleUI:hideGenerateSkillGridCells() local uiMap = self.root:genAllChildren() self.generateSkillGridEntities = {} for name, elementType in pairs(GConst.BattleConst.ELEMENT_TYPE) do - local obj = uiMap["battle_ui.bg_2.board_node.ani_node.grid_cell_" .. elementType] + local obj = uiMap["battle_ui.bg_2.ani_node.grid_cell_" .. elementType] if obj then local cell = CellManager:addCellComp(obj, GRID_CELL) local entity = DataManager.BattleData:getNewGridEntity()