diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index e5017cd8..e3e1417f 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -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 diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index 88408fee..05a86e40 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -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 - baseObject:setAnchoredPositionX(DEFAULT_X) + 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()