fix bug
This commit is contained in:
parent
fe2aeba65c
commit
4a737e7e68
@ -228,6 +228,7 @@ BattleConst.SPINE_ANIMATION_NAME = {
|
|||||||
BLOCK = "block",
|
BLOCK = "block",
|
||||||
FROZEN = "frozen",
|
FROZEN = "frozen",
|
||||||
VERTIGO = "vertigo",
|
VERTIGO = "vertigo",
|
||||||
|
WIN = "win",
|
||||||
}
|
}
|
||||||
|
|
||||||
BattleConst.EFFECT_TYPE = {
|
BattleConst.EFFECT_TYPE = {
|
||||||
|
|||||||
@ -259,6 +259,10 @@ function BattleUnitComp:stopRunAction()
|
|||||||
self:playAnimation(SPINE_ANIMATION_NAME.IDLE, true)
|
self:playAnimation(SPINE_ANIMATION_NAME.IDLE, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleUnitComp:playWinAction()
|
||||||
|
self:playAnimation(SPINE_ANIMATION_NAME.WIN, true)
|
||||||
|
end
|
||||||
|
|
||||||
function BattleUnitComp:playAnimation(name, loop, forceRefresh)
|
function BattleUnitComp:playAnimation(name, loop, forceRefresh)
|
||||||
if name == self.curHurtName or name == SPINE_ANIMATION_NAME.BLOCK then
|
if name == self.curHurtName or name == SPINE_ANIMATION_NAME.BLOCK then
|
||||||
self.isPlayingSubAni = true
|
self.isPlayingSubAni = true
|
||||||
|
|||||||
@ -3140,6 +3140,9 @@ function BattleBaseController:battleEnd()
|
|||||||
self.battleEndSid = nil
|
self.battleEndSid = nil
|
||||||
end
|
end
|
||||||
self.battleUI:disableUITouch()
|
self.battleUI:disableUITouch()
|
||||||
|
if self.victory then
|
||||||
|
self.atkTeam:playWinAction()
|
||||||
|
end
|
||||||
self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function()
|
self.battleEndSid = ModuleManager.BattleManager:performWithDelayGlobal(function()
|
||||||
if self.battleUI then
|
if self.battleUI then
|
||||||
self.battleUI:enableUITouch()
|
self.battleUI:enableUITouch()
|
||||||
@ -3172,7 +3175,7 @@ function BattleBaseController:battleEnd()
|
|||||||
if self.victory then
|
if self.victory then
|
||||||
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_BATTLE_VICTORY)
|
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_BATTLE_VICTORY)
|
||||||
end
|
end
|
||||||
end, 1)
|
end, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleBaseController:clear()
|
function BattleBaseController:clear()
|
||||||
|
|||||||
@ -716,6 +716,12 @@ function BattleTeam:stopRunAction()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleTeam:playWinAction()
|
||||||
|
if self.mainUnit then
|
||||||
|
self.mainUnit:playWinAction()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleTeam:recoverHpOnWaveOver(callback)
|
function BattleTeam:recoverHpOnWaveOver(callback)
|
||||||
if self.mainUnit then
|
if self.mainUnit then
|
||||||
self.mainUnit:recoverHpOnWaveOver(callback)
|
self.mainUnit:recoverHpOnWaveOver(callback)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user