战斗bug修复
This commit is contained in:
parent
36526bcd5e
commit
1035873eef
@ -24,13 +24,18 @@ end
|
||||
function BoardHelper:findPvpLinkOptimalSolution(battleController, startRow, endRow)
|
||||
local battleData = battleController.battleData
|
||||
local gridMap = BoardHelper:getEmptyTable()
|
||||
local minRow = math.min(startRow, endRow)
|
||||
local maxRow = math.max(startRow, endRow)
|
||||
for row = minRow, maxRow do -- 遍历所有的可使用格子
|
||||
local gridEntities = BoardHelper:getEmptyTable()
|
||||
local step = 1
|
||||
if startRow > endRow then
|
||||
step = -1
|
||||
end
|
||||
|
||||
for row = startRow, endRow, step do -- 遍历所有的可使用格子
|
||||
for column = 1, BattleConst.COLUMN_COUNT do
|
||||
local posId = ModuleManager.BattleManager:getPosId(row, column)
|
||||
local gridEntity = battleData:getGridEnties()[posId]
|
||||
if gridEntity and gridEntity:canLink() then
|
||||
table.insert(gridEntities, posId)
|
||||
gridMap[posId] = gridEntity
|
||||
end
|
||||
end
|
||||
@ -38,7 +43,8 @@ function BoardHelper:findPvpLinkOptimalSolution(battleController, startRow, endR
|
||||
|
||||
local maxPath
|
||||
local maxPathCount = 0
|
||||
for posId, entity in pairs(gridMap) do
|
||||
for _, posId in pairs(gridEntities) do
|
||||
local entity = gridMap[posId]
|
||||
local mainElementType
|
||||
if not entity:getSkillId() then
|
||||
mainElementType = entity:getElementType()
|
||||
|
||||
@ -234,9 +234,9 @@ end
|
||||
function BattleBaseUI:enterHideBoardAni(callback)
|
||||
self:clearEnterShowBoardSeq()
|
||||
self.enterShowBoardSeq = self.root:createBindTweenSequence()
|
||||
self.enterShowBoardSeq:AppendInterval(0.5)
|
||||
local w, h = GFunc.getUIExpandScreenSize()
|
||||
self.enterShowBoardSeq:Append(self:getBoardRootNode():getTransform():DOLocalMoveX(w / 2 + 360, 0.5))
|
||||
self.enterShowBoardSeq:AppendInterval(0.5)
|
||||
self.enterShowBoardSeq:AppendCallback(function()
|
||||
if callback then
|
||||
callback()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user