切换波次时自动关闭buff弹窗

This commit is contained in:
xiekaidong 2023-06-06 14:12:50 +08:00
parent 184b03d5ad
commit 0867e84815
3 changed files with 17 additions and 1 deletions

View File

@ -546,6 +546,9 @@ function BattleController:enterNextWave()
if not self.needWaitingBoardOver then
self:enterRoundBegin()
end
if not self.isBossWave then
self.battleUI:hideBuffTips()
end
end
function BattleController:enterRoundBegin()

View File

@ -41,7 +41,8 @@ function BattleDailyChallengeBuffUI:_display()
end
local txNode = uiMap["battle_daily_challenge_buff_ui.raw_img"]:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
txNode.alpha = 0
uiMap["battle_daily_challenge_buff_ui.ui_spine_obj"]:playAnim("idle", false, true)
local spineObj = uiMap["battle_daily_challenge_buff_ui.ui_spine_obj"]
spineObj:setVisible(false)
if self.txSeq then
self.txSeq:Kill()
@ -49,6 +50,11 @@ function BattleDailyChallengeBuffUI:_display()
end
self.txSeq = self.root:createBindTweenSequence()
self.txSeq:AppendInterval(0.2)
self.txSeq:AppendCallback(function()
spineObj:setVisible(true)
spineObj:playAnim("idle", false, true)
end)
self.txSeq:AppendInterval(0.2)
self.txSeq:Append(txNode:DOFade(1, 0.2))
end

View File

@ -377,6 +377,13 @@ function BattleUI:showBuffTips(buffList, autoClose)
end
end
function BattleUI:hideBuffTips()
if not self.battleBuffTipsRoot then
return
end
self.battleBuffTipsRoot:setLocalScale(0, 0, 0)
end
function BattleUI:getBattleBuffTipsObj(index)
if self.battleBuffTipsBuffList[index] then
return self.battleBuffTipsBuffList[index]