【三界降魔】活动结束后的提示文字优化
parent
c53d8b43bf
commit
cf3758d19b
File diff suppressed because it is too large
Load Diff
|
@ -26,8 +26,7 @@ function DemonSlayerPanel:InitComponent()
|
|||
this.helpBtn = Util.GetGameObject(self.gameObject,"HelpBtn")
|
||||
this.btnRank = Util.GetGameObject(self.gameObject,"RankList")
|
||||
|
||||
this.time = Util.GetGameObject(self.gameObject, "rewardContent/time")
|
||||
this.leftTime = Util.GetGameObject(self.gameObject, "rewardContent/time/num"):GetComponent("Text")
|
||||
this.timeText = Util.GetGameObject(self.gameObject, "rewardContent/time"):GetComponent("Text")
|
||||
this.myRank = Util.GetGameObject(self.gameObject, "rewardContent/myRank/num"):GetComponent("Text")
|
||||
this.pos = Util.GetGameObject(self.gameObject, "pos")
|
||||
|
||||
|
@ -171,7 +170,6 @@ function DemonSlayerPanel:SetState(ActInfo)
|
|||
state = 0--7天内
|
||||
else
|
||||
state = 1--2天内
|
||||
this.time:GetComponent("Text").text = Language[10424]
|
||||
end
|
||||
-- else
|
||||
-- self:ClosePanel()
|
||||
|
@ -256,12 +254,17 @@ end
|
|||
function DemonSlayerPanel:SetTime(ActInfo)
|
||||
local extraTime = ConfigManager.GetConfigData(ConfigName.GlobalActivity,ActInfo.activityId).GapTime*86400
|
||||
--设置一进去的时间,不设置的话一进去会不对
|
||||
-- this.time:SetActive(state == 0)
|
||||
local time = ActInfo.endTime - GetTimeStamp() - extraTime
|
||||
if time > 3600 then
|
||||
this.leftTime.text = TimeToDHM(time)
|
||||
local timeStr = "距排名结算:%s"
|
||||
if time > 0 then
|
||||
timeStr = "距排名结算:%s"
|
||||
else
|
||||
this.leftTime.text = TimeToMS(time)
|
||||
timeStr = "活动已结束"
|
||||
end
|
||||
if time > 3600 then
|
||||
this.timeText.text = string.format(timeStr,TimeToDHM(time))
|
||||
else
|
||||
this.timeText.text = string.format(timeStr,TimeToMS(time))
|
||||
end
|
||||
|
||||
if self.timer then
|
||||
|
@ -273,9 +276,9 @@ function DemonSlayerPanel:SetTime(ActInfo)
|
|||
if state == 0 then
|
||||
local time = ActInfo.endTime - GetTimeStamp() - extraTime
|
||||
if time > 3600 then
|
||||
this.leftTime.text = TimeToDHM(time)
|
||||
this.timeText.text = string.format(timeStr,TimeToDHM(time))
|
||||
else
|
||||
this.leftTime.text = TimeToMS(time)
|
||||
this.timeText.text = string.format(timeStr,TimeToMS(time))
|
||||
end
|
||||
time = time -1
|
||||
if time <= 0 then
|
||||
|
@ -284,9 +287,9 @@ function DemonSlayerPanel:SetTime(ActInfo)
|
|||
elseif state == 1 then
|
||||
local time = ActInfo.endTime - GetTimeStamp()
|
||||
if time > 3600 then
|
||||
this.leftTime.text = TimeToDHM(time)
|
||||
this.timeText.text = string.format(timeStr,TimeToDHM(time))
|
||||
else
|
||||
this.leftTime.text = TimeToMS(time)
|
||||
this.timeText.text = string.format(timeStr,TimeToMS(time))
|
||||
end
|
||||
time = time -1
|
||||
if time <= 0 then
|
||||
|
|
Loading…
Reference in New Issue