Merge branch '0功能/灵兽系统' into master_develop
commit
93758f24f8
|
|
@ -215,38 +215,44 @@ end
|
|||
|
||||
--时间
|
||||
function PokemonSummonPanel:timeCountDown()
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
if self.timer2 then
|
||||
self.timer2:Stop()
|
||||
self.timer2 = nil
|
||||
end
|
||||
if freeTime>0 then
|
||||
self.oneHintTxt.text=string.format(Language[12400],freeTime)
|
||||
else
|
||||
local timeDown = CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
|
||||
self.oneHintTxt.text =string.format(Language[12412],TimeToHMS(timeDown))
|
||||
--免费次数刷新倒计时
|
||||
self.timer = Timer.New(function()
|
||||
self.oneHintTxt.text = string.format(Language[12412],TimeToHMS(timeDown))
|
||||
if timeDown < 1 then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
return
|
||||
end
|
||||
timeDown = timeDown -1
|
||||
end, 1, -1, true)
|
||||
--特权剩余时间倒计时
|
||||
if leftTime>0 then
|
||||
self.timer2 = Timer.New(function()
|
||||
self.leftTimeTxt.text= "剩余:"..GetLeftTimeStrByDeltaTime(leftTime)
|
||||
if leftTime < 1 then
|
||||
self.timer2:Stop()
|
||||
self.timer2 = nil
|
||||
local timeDown = CalculateSecondsNowTo_N_OClock(5)--领取按钮的倒计时
|
||||
self.oneHintTxt.text =string.format(Language[12412],TimeToHMS(timeDown))
|
||||
--免费次数刷新倒计时
|
||||
self.timer = Timer.New(function()
|
||||
if timeDown < 1 then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
return
|
||||
end
|
||||
leftTime = leftTime -1
|
||||
timeDown = timeDown -1
|
||||
self.oneHintTxt.text = string.format(Language[12412],TimeToHMS(timeDown))
|
||||
end, 1, -1, true)
|
||||
self.timer2:Start()
|
||||
self.timer:Start()
|
||||
end
|
||||
self.timer:Start()
|
||||
|
||||
end
|
||||
|
||||
--特权剩余时间倒计时
|
||||
if leftTime>0 then
|
||||
self.timer2 = Timer.New(function()
|
||||
if leftTime < 1 then
|
||||
self.timer2:Stop()
|
||||
self.timer2 = nil
|
||||
return
|
||||
end
|
||||
leftTime = leftTime -1
|
||||
self.leftTimeTxt.text= "剩余:"..GetLeftTimeStrByDeltaTime(leftTime)
|
||||
end, 1, -1, true)
|
||||
self.timer2:Start()
|
||||
end
|
||||
end
|
||||
|
||||
--- 将一段时间转换为天时分秒
|
||||
|
|
@ -273,6 +279,10 @@ function PokemonSummonPanel:OnHide()
|
|||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
if self.timer2 then
|
||||
self.timer2:Stop()
|
||||
self.timer2 = nil
|
||||
end
|
||||
if self.shopView then
|
||||
self.shopView = SubUIManager.Close(self.shopView)
|
||||
self.shopView = nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue