diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 4673900a..5fbb69f8 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -228,6 +228,7 @@ BattleConst.SPINE_ANIMATION_NAME = { BLOCK = "block", FROZEN = "frozen", VERTIGO = "vertigo", + WIN = "win", } BattleConst.EFFECT_TYPE = { diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index 38130a50..a6038cf3 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -259,6 +259,10 @@ function BattleUnitComp:stopRunAction() self:playAnimation(SPINE_ANIMATION_NAME.IDLE, true) end +function BattleUnitComp:playWinAction() + self:playAnimation(SPINE_ANIMATION_NAME.WIN, true) +end + function BattleUnitComp:playAnimation(name, loop, forceRefresh) if name == self.curHurtName or name == SPINE_ANIMATION_NAME.BLOCK then self.isPlayingSubAni = true diff --git a/lua/app/module/battle/controller/battle_base_controller.lua b/lua/app/module/battle/controller/battle_base_controller.lua index 376a373f..bc4f9744 100644 --- a/lua/app/module/battle/controller/battle_base_controller.lua +++ b/lua/app/module/battle/controller/battle_base_controller.lua @@ -3140,6 +3140,9 @@ function BattleBaseController:battleEnd() self.battleEndSid = nil end self.battleUI:disableUITouch() + if self.victory then + self.atkTeam:playWinAction() + end self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function() if self.battleUI then self.battleUI:enableUITouch() @@ -3172,7 +3175,7 @@ function BattleBaseController:battleEnd() if self.victory then ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_BATTLE_VICTORY) end - end, 1) + end, 2) end function BattleBaseController:clear() diff --git a/lua/app/module/battle/team/battle_team.lua b/lua/app/module/battle/team/battle_team.lua index 96a24eda..04675749 100644 --- a/lua/app/module/battle/team/battle_team.lua +++ b/lua/app/module/battle/team/battle_team.lua @@ -716,6 +716,12 @@ function BattleTeam:stopRunAction() end end +function BattleTeam:playWinAction() + if self.mainUnit then + self.mainUnit:playWinAction() + end +end + function BattleTeam:recoverHpOnWaveOver(callback) if self.mainUnit then self.mainUnit:recoverHpOnWaveOver(callback)