bug修复
This commit is contained in:
parent
383c6ac0dc
commit
c01cc5c9db
@ -926,6 +926,18 @@ function BattleController:onLinkOver()
|
|||||||
end
|
end
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -723,8 +723,6 @@ function BattleUI:initGridCell()
|
|||||||
CellManager:loadCellAsync(GRID_CELL_PATH, GRID_CELL, self.gridNode, function(cell)
|
CellManager:loadCellAsync(GRID_CELL_PATH, GRID_CELL, self.gridNode, function(cell)
|
||||||
local posId = ModuleManager.BattleManager:getPosId(r, c)
|
local posId = ModuleManager.BattleManager:getPosId(r, c)
|
||||||
self.gridCells[posId] = cell
|
self.gridCells[posId] = cell
|
||||||
local gameObject = cell:getGameObject()
|
|
||||||
gameObject.name = "grid_cell_" .. posId
|
|
||||||
cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 初始化时放到屏幕外
|
cell:getBaseObject():setAnchoredPositionX(DEFAULT_X) -- 初始化时放到屏幕外
|
||||||
|
|
||||||
self.cellLoadRemianCount = self.cellLoadRemianCount - 1
|
self.cellLoadRemianCount = self.cellLoadRemianCount - 1
|
||||||
@ -855,6 +853,7 @@ function BattleUI:eliminationAni(sequence, callback)
|
|||||||
local entity = DataManager.BattleData:getGridEntity(info.posId)
|
local entity = DataManager.BattleData:getGridEntity(info.posId)
|
||||||
|
|
||||||
if entity and entity:getCell() then
|
if entity and entity:getCell() then
|
||||||
|
entity:getCell():refresh(entity)
|
||||||
local baseObject = entity:getCell():getBaseObject()
|
local baseObject = entity:getCell():getBaseObject()
|
||||||
baseObject:getTransform():SetAsLastSibling()
|
baseObject:getTransform():SetAsLastSibling()
|
||||||
if info.noAni then
|
if info.noAni then
|
||||||
@ -1119,10 +1118,7 @@ function BattleUI:fallGrid(listInfo, callback)
|
|||||||
self.fallAniCount = self.fallAniCount + 1
|
self.fallAniCount = self.fallAniCount + 1
|
||||||
local entity = DataManager.BattleData:getGridEntity(posId)
|
local entity = DataManager.BattleData:getGridEntity(posId)
|
||||||
local cell = entity:getCell()
|
local cell = entity:getCell()
|
||||||
local posId = entity:getPosId()
|
|
||||||
if cell then
|
if cell then
|
||||||
local gameObject = cell:getGameObject()
|
|
||||||
gameObject.name = "grid_cell_" .. posId
|
|
||||||
if cell.fallSeq then
|
if cell.fallSeq then
|
||||||
cell.fallSeq:Kill()
|
cell.fallSeq:Kill()
|
||||||
cell.fallSeq = nil
|
cell.fallSeq = nil
|
||||||
|
|||||||
@ -88,6 +88,11 @@ function GridCell:refresh(gridEntity, curElement, skillPosId)
|
|||||||
self:hideAni()
|
self:hideAni()
|
||||||
end
|
end
|
||||||
self:showHighLight(false, self.lastShowHlElementType)
|
self:showHighLight(false, self.lastShowHlElementType)
|
||||||
|
|
||||||
|
if self.lastPosId ~= gridEntity:getPosId() then
|
||||||
|
self.lastPosId = gridEntity:getPosId()
|
||||||
|
self:getGameObject().name = "grid_cell_" .. self.lastPosId
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function GridCell:addTouchListener(func)
|
function GridCell:addTouchListener(func)
|
||||||
|
|||||||
@ -85,6 +85,7 @@ end
|
|||||||
|
|
||||||
function BattleGridEntity:addAroundEliminationCount(boomType)
|
function BattleGridEntity:addAroundEliminationCount(boomType)
|
||||||
if self:getIsIdle() then
|
if self:getIsIdle() then
|
||||||
|
self:setGridType(BattleConst.GRID_TYPE.EMPTY)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local nextGridType = BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT[self.gridType]
|
local nextGridType = BattleConst.AROUND_ELIMINATION_TO_TYPE_COUNT[self.gridType]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user