From d71c41b40c68f6c86586664d10b926cc923e56e2 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Tue, 25 Apr 2023 18:46:24 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../battle/controller/battle_controller.lua | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index f7fed325..066b5691 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -390,31 +390,7 @@ function BattleController:enterEliminationBegin() self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN self:onEliminationBegin() self:popBoardCacheSkill(function() - -- 检查棋盘 - local find, pathList = self:findAttention() - if not find then -- 如果没找到,就要打乱棋盘 - local changeInfo = self:shuffleBoard() - if changeInfo then - self.battleData:setGridEntitiesPosId(changeInfo) - self.battleUI:shuffleBoard(changeInfo, function() - self:enterElimination(true) - end) - else - Logger.logHighlight("----- 处于无法消除状态 -----") - end - else - self.attentionList = pathList - -- ModuleManager.BattleManager:performWithDelayGlobal(function() - -- for _, posId in ipairs(pathList) do - -- local entity = self.battleData:getGridEntity(posId) - -- if entity and entity:getCell() then - -- entity:getCell():showAni() - -- end - -- end - -- end, 2) - - self:enterElimination(true) - end + self:enterElimination(true) end) end @@ -434,7 +410,30 @@ function BattleController:enterElimination(needDelay) ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList()) end else - self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION + -- 检查棋盘 + local find, pathList = self:findAttention() + if not find then -- 如果没找到,就要打乱棋盘 + local changeInfo = self:shuffleBoard() + if changeInfo then + self.battleData:setGridEntitiesPosId(changeInfo) + self.battleUI:shuffleBoard(changeInfo, function() + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION + end) + else + Logger.logHighlight("----- 处于无法消除状态 -----") + end + else + self.attentionList = pathList + -- ModuleManager.BattleManager:performWithDelayGlobal(function() + -- for _, posId in ipairs(pathList) do + -- local entity = self.battleData:getGridEntity(posId) + -- if entity and entity:getCell() then + -- entity:getCell():showAni() + -- end + -- end + -- end, 2) + self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION + end end end