调整召唤动画
This commit is contained in:
parent
ec58c080ad
commit
6c673d7977
@ -121,6 +121,10 @@ function HeroCell:setVisible(visible, scale)
|
||||
self.baseObject:setVisible(visible, scale)
|
||||
end
|
||||
|
||||
function HeroCell:setSpineVisible(visible, scale)
|
||||
self.lvUpArrow:setVisible(visible, scale)
|
||||
end
|
||||
|
||||
function HeroCell:setGray(isGray)
|
||||
if self.isGray == isGray then
|
||||
return
|
||||
|
||||
@ -202,12 +202,22 @@ function BoxRewardUI:playCellAction(cell, idx)
|
||||
|
||||
local seq = cell.baseObject:createBindTweenSequence()
|
||||
table.insert(self.cellSeqs, seq)
|
||||
|
||||
local tween = canvasGroup:DOFade(1, FADE_TIME)
|
||||
seq:AppendInterval(delayTime)
|
||||
tween:SetEase(CS.DG.Tweening.Ease.InOutSine)
|
||||
seq:AppendCallback(function()
|
||||
cell:setSpineVisible(false) -- 防止spine因透明度变化导致的闪白
|
||||
end)
|
||||
seq:Append(tween)
|
||||
seq:AppendCallback(function()
|
||||
if not self:isClosed() then
|
||||
-- 如果需要spine 则显示
|
||||
local heroEntity = DataManager.HeroData:getHeroById(self.fragmentRewards[idx].id)
|
||||
if heroEntity and heroEntity:canLvUp() then
|
||||
cell:setSpineVisible(true)
|
||||
end
|
||||
|
||||
self.actionStatus[idx] = true
|
||||
self:turnToNext(idx)
|
||||
-- 最后一个表现完毕
|
||||
@ -274,7 +284,6 @@ function BoxRewardUI:jump()
|
||||
for _, cellSeq in ipairs(self.cellSeqs) do
|
||||
cellSeq.timeScale = JUMP_TIME_SCALE
|
||||
end
|
||||
self.cellSeqs = nil
|
||||
end
|
||||
if self.contentSeq then
|
||||
self.contentSeq.timeScale = JUMP_TIME_SCALE
|
||||
|
||||
@ -20,6 +20,10 @@ function BoxHeroCell:refresh(data)
|
||||
self.heroNumText:setText("X" .. tostring(num))
|
||||
end
|
||||
|
||||
function BoxHeroCell:setSpineVisible(visible)
|
||||
self.heroCell:setSpineVisible(visible)
|
||||
end
|
||||
|
||||
function BoxHeroCell:setVisible(visible)
|
||||
self.baseObject:setVisible(visible)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user