bug修复

This commit is contained in:
xiekaidong 2023-04-25 18:46:24 +08:00
parent 3dc6d91f33
commit d71c41b40c

View File

@ -390,32 +390,8 @@ 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
end)
end
function BattleController:enterElimination(needDelay)
@ -434,7 +410,30 @@ function BattleController:enterElimination(needDelay)
ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList())
end
else
-- 检查棋盘
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