去掉boss停帧

This commit is contained in:
xiekaidong 2023-06-02 09:37:09 +08:00
parent 9b0a928b35
commit 3b36d944c9

View File

@ -2061,11 +2061,6 @@ function BattleUI:showBossEnterAni(bornTime, bossName, monsterComp, callback)
self.bossName:setAnchoredPositionX(-756) self.bossName:setAnchoredPositionX(-756)
self.bossEnterNodeCanvasGroup.alpha = 0 self.bossEnterNodeCanvasGroup.alpha = 0
monsterComp:getBaseObject():setLocalPosition(DEFAULT_X, 0, 0) monsterComp:getBaseObject():setLocalPosition(DEFAULT_X, 0, 0)
local keyFrameTimes = self.bossEnterImg:getAnimationKeyFrameTime("idle")
local keyFrameTime = 0
if keyFrameTimes then
keyFrameTime = keyFrameTimes[1] or 0
end
if self.bossEnterAniSeq then if self.bossEnterAniSeq then
self.bossEnterAniSeq:Kill() self.bossEnterAniSeq:Kill()
self.bossEnterAniSeq = nil self.bossEnterAniSeq = nil
@ -2092,16 +2087,6 @@ function BattleUI:showBossEnterAni(bornTime, bossName, monsterComp, callback)
self.battleController:showBuffTips(GConst.BattleConst.SIDE_DEF, true) self.battleController:showBuffTips(GConst.BattleConst.SIDE_DEF, true)
self.bossEnterNodeAnimator.enabled = false self.bossEnterNodeAnimator.enabled = false
end) end)
if keyFrameTime > 0 then
local addTime = 1
self.bossEnterAniSeq:InsertCallback(keyFrameTime + 0.2, function()
self.battleController:setTimeScale(0)
end)
self.bossEnterAniSeq:InsertCallback(keyFrameTime + 0.2 + addTime, function()
self.battleController:setTimeScale(DataManager.BattleData:getTimeScale())
end)
end
end end
function BattleUI:clear() function BattleUI:clear()