bug修复

This commit is contained in:
xiekaidong 2023-06-05 10:36:30 +08:00
parent 6e65ce411f
commit 5340ecd4b7

View File

@ -1339,18 +1339,24 @@ end
function BattleController:generateBoard(isFirst) function BattleController:generateBoard(isFirst)
local boardList, _, mysteryBoxIndexMap = self:getInitBoard() local boardList, _, mysteryBoxIndexMap = self:getInitBoard()
if self.curBoardIndex and self.curBoardIndex >= #boardList then if self.curBoardIndex and self.curBoardIndex >= #boardList then
if isFirst then
self.needWaitingBoardOver = false self.needWaitingBoardOver = false
end
return return
end end
if not self.battleUI then if not self.battleUI then
if isFirst then
self.needWaitingBoardOver = false self.needWaitingBoardOver = false
end
return return
end end
self.curBoardIndex = (self.curBoardIndex or 0) + 1 self.curBoardIndex = (self.curBoardIndex or 0) + 1
if not boardList[self.curBoardIndex] then -- 容错 if not boardList[self.curBoardIndex] then -- 容错
if isFirst then
self.needWaitingBoardOver = false self.needWaitingBoardOver = false
end
return return
end end
local board = boardList[self.curBoardIndex].board local board = boardList[self.curBoardIndex].board
@ -1361,10 +1367,11 @@ function BattleController:generateBoard(isFirst)
self.battleUI:switchBoard(function() self.battleUI:switchBoard(function()
self.battleData:refreshBoard(board, self:getBlockIcon()) self.battleData:refreshBoard(board, self:getBlockIcon())
self.battleUI:initGridCell(function() self.battleUI:initGridCell(function()
if isFirst then
self.needWaitingBoardOver = false self.needWaitingBoardOver = false
end
end) end)
end, function() end, function()
-- self:enterRoundBegin()
end, isFirst) end, isFirst)
end end