定时器处理
This commit is contained in:
parent
2da8da07d0
commit
692277440e
@ -8,15 +8,17 @@ function EquipManager:showItemGetPop(heroId, part, id, num)
|
||||
end
|
||||
|
||||
-- 检查装备礼包状态定时器
|
||||
function EquipManager:updateEquipGiftTimer()
|
||||
self:unscheduleGlobal(self.giftSid)
|
||||
function EquipManager:updateEquipGiftTimer(isClear)
|
||||
self:unscheduleAll()
|
||||
|
||||
local time = DataManager.EquipData:getGiftNearestRemainTime()
|
||||
if time and time > 0 then
|
||||
Logger.logHighlight("设置装备礼包倒计时:"..time)
|
||||
self.giftSid = self:performWithDelayGlobal(function()
|
||||
DataManager.EquipData:onGiftStateChange()
|
||||
end, time)
|
||||
if not isClear then
|
||||
local time = DataManager.EquipData:getGiftNearestRemainTime()
|
||||
if time and time > 0 then
|
||||
Logger.logHighlight("设置装备礼包倒计时:"..time)
|
||||
self.giftSid = self:performWithDelayGlobal(function()
|
||||
DataManager.EquipData:onGiftStateChange()
|
||||
end, time)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ function EquipData:ctor()
|
||||
end
|
||||
|
||||
function EquipData:clear()
|
||||
ModuleManager.EquipManager:updateEquipGiftTimer(true)
|
||||
end
|
||||
|
||||
function EquipData:init(data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user