bug修复

This commit is contained in:
xiekaidong 2023-04-27 15:24:24 +08:00
parent 383c6ac0dc
commit c01cc5c9db
4 changed files with 19 additions and 5 deletions

View File

@ -926,6 +926,18 @@ function BattleController:onLinkOver()
end
end
end
else
if entity:getIsIdle() then
if BattleConst.GRID_TYPE_BREAK_SFX[gridType] then
if not gridBreakSfxInfo then
gridBreakSfxInfo = {}
end
if not gridBreakSfxInfo[gridType] then
gridBreakSfxInfo[gridType] = {}
end
table.insert(gridBreakSfxInfo[gridType], posId)
end
end
end
end
end

View File

@ -723,8 +723,6 @@ function BattleUI:initGridCell()
CellManager:loadCellAsync(GRID_CELL_PATH, GRID_CELL, self.gridNode, function(cell)
local posId = ModuleManager.BattleManager:getPosId(r, c)
self.gridCells[posId] = cell
local gameObject = cell:getGameObject()
gameObject.name = "grid_cell_" .. posId
cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 初始化时放到屏幕外
self.cellLoadRemianCount = self.cellLoadRemianCount - 1
@ -855,6 +853,7 @@ function BattleUI:eliminationAni(sequence, callback)
local entity = DataManager.BattleData:getGridEntity(info.posId)
if entity and entity:getCell() then
entity:getCell():refresh(entity)
local baseObject = entity:getCell():getBaseObject()
baseObject:getTransform():SetAsLastSibling()
if info.noAni then
@ -1119,10 +1118,7 @@ function BattleUI:fallGrid(listInfo, callback)
self.fallAniCount = self.fallAniCount + 1
local entity = DataManager.BattleData:getGridEntity(posId)
local cell = entity:getCell()
local posId = entity:getPosId()
if cell then
local gameObject = cell:getGameObject()
gameObject.name = "grid_cell_" .. posId
if cell.fallSeq then
cell.fallSeq:Kill()
cell.fallSeq = nil

View File

@ -88,6 +88,11 @@ function GridCell:refresh(gridEntity, curElement, skillPosId)
self:hideAni()
end
self:showHighLight(false, self.lastShowHlElementType)
if self.lastPosId ~= gridEntity:getPosId() then
self.lastPosId = gridEntity:getPosId()
self:getGameObject().name = "grid_cell_" .. self.lastPosId
end
end
function GridCell:addTouchListener(func)

View File

@ -85,6 +85,7 @@ end
function BattleGridEntity:addAroundEliminationCount(boomType)
if self:getIsIdle() then
self:setGridType(BattleConst.GRID_TYPE.EMPTY)
return false
end
local nextGridType = BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT[self.gridType]