召唤表现调整

This commit is contained in:
CloudJ 2023-06-01 15:42:17 +08:00
parent 03d2625a0c
commit d2b99b7593
2 changed files with 11 additions and 7 deletions

View File

@ -17,8 +17,4 @@ function SideBarFirstRechargeCell:onClick()
ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true) ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true)
end end
function SideBarFirstRechargeCell:getIsShowRedPoint()
return false
end
return SideBarFirstRechargeCell return SideBarFirstRechargeCell

View File

@ -6,9 +6,10 @@ local QLT_DELAY_TIME = {
[1] = 0.3, -- 预留 [1] = 0.3, -- 预留
[2] = 0.3, -- 绿 [2] = 0.3, -- 绿
[3] = 0.3, -- 蓝 [3] = 0.3, -- 蓝
[4] = 0.5, -- 紫 [4] = 1.5, -- 紫
[5] = 0.5, -- 预留 [5] = 0.5, -- 预留
} }
local FIRST_DELAY_TIME = 0
local FADE_TIME = 0.5 local FADE_TIME = 0.5
local MAX_SCREEN_CELL_COUNT = 12 -- 同屏界面能展示的最大数量 local MAX_SCREEN_CELL_COUNT = 12 -- 同屏界面能展示的最大数量
@ -22,6 +23,8 @@ function BoxRewardUI:ctor(params)
-- self.turnIdx = MAX_SCREEN_CELL_COUNT // CELL_NUM -- self.turnIdx = MAX_SCREEN_CELL_COUNT // CELL_NUM
-- self.maxIdx = math.ceil(#self.params.rewards / CELL_NUM) -- self.maxIdx = math.ceil(#self.params.rewards / CELL_NUM)
-- end -- end
-- 将超过界面展示范围外的cell默认打开
if #self.params.rewards > MAX_SCREEN_CELL_COUNT then if #self.params.rewards > MAX_SCREEN_CELL_COUNT then
for i = MAX_SCREEN_CELL_COUNT + 1, #self.params.rewards do for i = MAX_SCREEN_CELL_COUNT + 1, #self.params.rewards do
self.actionStatus[i] = true self.actionStatus[i] = true
@ -105,7 +108,12 @@ function BoxRewardUI:playCellAction(cell, idx)
if self.actionStatus[idx] then if self.actionStatus[idx] then
return return
end end
local delayTime = self:getCellDelayTime(idx)
local delayTime = FIRST_DELAY_TIME
if idx > 1 then
delayTime = self:getCellDelayTime(idx - 1)
end
local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
if not canvasGroup then if not canvasGroup then
canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP)
@ -113,8 +121,8 @@ function BoxRewardUI:playCellAction(cell, idx)
canvasGroup.alpha = 0 canvasGroup.alpha = 0
local seq = cell.baseObject:createBindTweenSequence() local seq = cell.baseObject:createBindTweenSequence()
seq:AppendInterval(delayTime)
local tween = canvasGroup:DOFade(1, FADE_TIME) local tween = canvasGroup:DOFade(1, FADE_TIME)
seq:AppendInterval(delayTime)
tween:SetEase(CS.DG.Tweening.Ease.InOutSine) tween:SetEase(CS.DG.Tweening.Ease.InOutSine)
seq:Append(tween) seq:Append(tween)
seq:AppendCallback(function() seq:AppendCallback(function()