消除显示优化
This commit is contained in:
parent
d4cf1c58fd
commit
cc77a77193
@ -1122,7 +1122,8 @@ function BattleController:dealGridBreak(posId, condition, time, breakedMap, sequ
|
||||
aniUnit.callback = nil
|
||||
for index, id in ipairs(list) do
|
||||
if id ~= posId then
|
||||
self:dealGridBreak(id, GRID_BREAK_CONDITION.SKILL, time + BattleConst.GRID_BREAK_EFFECT_INTERVAL * index, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck)
|
||||
local timeIdx = time + BattleConst.GRID_BREAK_EFFECT_INTERVAL * (index - 1) -- 因为第一个是自己,所以-1
|
||||
self:dealGridBreak(id, GRID_BREAK_CONDITION.SKILL, timeIdx, breakedMap, sequenceMap, aniSequence, gridMap, onlyCheck)
|
||||
table.insert(aniUnit.aniPosList, id)
|
||||
end
|
||||
end
|
||||
|
||||
@ -16,6 +16,12 @@ local CACHE_SKILL_POS_1 = {x = 10, y = 360}
|
||||
local CACHE_SKILL_POS_2 = {x = 10, y = 420}
|
||||
local BATTLE_COMMON_PATH = "assets/arts/textures/background/battle_common/%s.png"
|
||||
local BOARD_SFX_ORDER = GConst.UI_EFFECT_ORDER.LEVEL4 + 1
|
||||
local MAX_LASTSIBLING_TYPE = {
|
||||
[8] = true,
|
||||
[9] = true,
|
||||
[10] = true,
|
||||
[11] = true,
|
||||
}
|
||||
|
||||
function BattleUI:getPrefabPath()
|
||||
return "assets/prefabs/ui/battle/battle_ui.prefab"
|
||||
@ -967,7 +973,9 @@ function BattleUI:eliminationAni(aniSequence, effectGridMap, callback)
|
||||
self.eliminationAniSeq:Insert(time, baseObject:getTransform():DOLocalPath(posList, anitime):SetEase(CS.DG.Tweening.Ease.Linear))
|
||||
else
|
||||
if info.noAni then
|
||||
self.eliminationAniSeq:InsertCallback(time, function()
|
||||
baseObject:setAnchoredPositionX(DEFAULT_X)
|
||||
end)
|
||||
else
|
||||
if info.rangeList then
|
||||
self.eliminationAniSeq:InsertCallback(time, function()
|
||||
@ -1003,10 +1011,23 @@ function BattleUI:eliminationAni(aniSequence, effectGridMap, callback)
|
||||
end
|
||||
end
|
||||
|
||||
local list
|
||||
for posId, _ in pairs(effectGridMap) do
|
||||
local entity = DataManager.BattleData:getGridEntity(posId)
|
||||
local baseObject = entity:getCell():getBaseObject()
|
||||
baseObject:getTransform():SetAsLastSibling()
|
||||
if MAX_LASTSIBLING_TYPE[entity:getGridType()] then
|
||||
if not list then
|
||||
list = {}
|
||||
end
|
||||
table.insert(list, baseObject)
|
||||
end
|
||||
end
|
||||
|
||||
if list then
|
||||
for _, baseObject in ipairs(list) do
|
||||
baseObject:getTransform():SetAsLastSibling()
|
||||
end
|
||||
end
|
||||
|
||||
self.eliminationAniSeq:AppendCallback(function()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user