【车迟斗法】提交

dev_chengFeng
张彪 2022-03-03 14:39:24 +08:00
parent 45661cf346
commit 0b75ce4df4
1 changed files with 29 additions and 17 deletions

View File

@ -412,24 +412,36 @@ local _BGMFlag = nil
function this._TimeUpdate()
--车迟斗法倒计时显示
local timeDown = -1
local text
if GuildCarDelayManager.progress == GuildCarDelayProType.Challenge and PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_CHALLENGE) > 0 then
timeDown = GuildCarDelayManager.ChallengeCdTime
text = "挑战"
elseif GuildCarDelayManager.progress == GuildCarDelayProType.Loot and PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT) > 0 then
timeDown = GuildCarDelayManager.LootCdTime
text = "抢夺"
end
this.timeCount:SetActive(false)
if timeDown > 0 then
this.timeCount:SetActive(true)
this.timeText.text = string.format("%s后可以%s",TimeToMorS(timeDown),text)
--这个结构不适合做==0的判断无奈写了个Timer
if timeDown == 1 then
Timer.New(function ()
CheckRedPointStatus(RedPointType.LegendExplore)
end,1.5):Start()
if GuildCarDelayManager.progress == GuildCarDelayProType.Challenge then
if PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_CHALLENGE) > 0 then
timeDown = GuildCarDelayManager.ChallengeCdTime
if timeDown > 0 then
this.timeText.text = string.format("%s后可以挑战",TimeToMorS(timeDown))
else
this.timeText.text = string.format("挑战中")
end
else
this.timeText.text = string.format("15点开始抢夺")
end
elseif GuildCarDelayManager.progress == GuildCarDelayProType.Loot then
if PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GUILD_CAR_DELEAY_LOOT) > 0 then
timeDown = GuildCarDelayManager.ChallengeCdTime
if timeDown > 0 then
this.timeText.text = string.format("%s后可以抢夺",TimeToMorS(timeDown))
else
this.timeText.text = string.format("抢夺中")
end
else
this.timeText.text = string.format("每日8点开启")
end
else
this.timeText.text = string.format("每日8点开启")
end
--这个结构不适合做==0的判断无奈写了个Timer
if timeDown == 1 then
Timer.New(function ()
CheckRedPointStatus(RedPointType.LegendExplore)
end,1.5):Start()
end