This commit is contained in:
puxuan 2025-09-08 11:45:19 +08:00
parent fe2aeba65c
commit 4a737e7e68
4 changed files with 15 additions and 1 deletions

View File

@ -228,6 +228,7 @@ BattleConst.SPINE_ANIMATION_NAME = {
BLOCK = "block",
FROZEN = "frozen",
VERTIGO = "vertigo",
WIN = "win",
}
BattleConst.EFFECT_TYPE = {

View File

@ -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

View File

@ -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()

View File

@ -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)