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