开服冲榜修改
parent
3ff54b15a3
commit
36bc9a16eb
|
@ -5,6 +5,7 @@ local this=ActivityChongRank
|
||||||
local infoConfig=ConfigManager.GetConfig(ConfigName.ChongRankInfo)
|
local infoConfig=ConfigManager.GetConfig(ConfigName.ChongRankInfo)
|
||||||
local rankConfig=ConfigManager.GetConfig(ConfigName.ChongRank)
|
local rankConfig=ConfigManager.GetConfig(ConfigName.ChongRank)
|
||||||
local curConfig=nil
|
local curConfig=nil
|
||||||
|
local currId=0
|
||||||
local type=0
|
local type=0
|
||||||
local btnType=0
|
local btnType=0
|
||||||
local rankType=0
|
local rankType=0
|
||||||
|
@ -51,6 +52,7 @@ function this:InitComponent()
|
||||||
local closeTime=this.actData.startTime+configInfo.CloseTime
|
local closeTime=this.actData.startTime+configInfo.CloseTime
|
||||||
if GetTimeStamp()>=openTime and GetTimeStamp()<=closeTime then --活动未开启
|
if GetTimeStamp()>=openTime and GetTimeStamp()<=closeTime then --活动未开启
|
||||||
curConfig=configInfo
|
curConfig=configInfo
|
||||||
|
currId=curConfig.Id
|
||||||
isFirst=true
|
isFirst=true
|
||||||
end
|
end
|
||||||
table.insert(this.btnList,tabBtn)
|
table.insert(this.btnList,tabBtn)
|
||||||
|
@ -70,16 +72,7 @@ function this:OnShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.TabBtnOnClick(config,btn)
|
function this.TabBtnOnClick(config,btn)
|
||||||
this.selectObj.transform:SetParent(btn.transform)
|
|
||||||
this.selectObj.transform.localScale = Vector3.one
|
|
||||||
this.selectObj.transform.localPosition = Vector3.zero
|
|
||||||
this.selectTxt.text=config.RankName
|
|
||||||
qaId=config.QAConfig
|
|
||||||
--设置时间
|
|
||||||
if this.timer then
|
|
||||||
this.timer:Stop()
|
|
||||||
this.timer = nil
|
|
||||||
end
|
|
||||||
local time=0
|
local time=0
|
||||||
local openTime=this.actData.startTime+config.OpenTime
|
local openTime=this.actData.startTime+config.OpenTime
|
||||||
local closeTime=this.actData.startTime+config.CloseTime
|
local closeTime=this.actData.startTime+config.CloseTime
|
||||||
|
@ -94,6 +87,20 @@ function this.TabBtnOnClick(config,btn)
|
||||||
time=0
|
time=0
|
||||||
state=3
|
state=3
|
||||||
end
|
end
|
||||||
|
if state==1 and config.Id>currId+1 then
|
||||||
|
PopupTipPanel.ShowTip("排行榜暂未开启")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
this.selectObj.transform:SetParent(btn.transform)
|
||||||
|
this.selectObj.transform.localScale = Vector3.one
|
||||||
|
this.selectObj.transform.localPosition = Vector3.zero
|
||||||
|
this.selectTxt.text=config.RankName
|
||||||
|
qaId=config.QAConfig
|
||||||
|
--设置时间
|
||||||
|
if this.timer then
|
||||||
|
this.timer:Stop()
|
||||||
|
this.timer = nil
|
||||||
|
end
|
||||||
if state==1 then
|
if state==1 then
|
||||||
this.leftTimeTxt.text = string.format("活动开始倒计时:".."%s",TimeToFelaxible(time))
|
this.leftTimeTxt.text = string.format("活动开始倒计时:".."%s",TimeToFelaxible(time))
|
||||||
elseif state==2 then
|
elseif state==2 then
|
||||||
|
@ -310,7 +317,7 @@ function this.UpdateRankInfo(go,data)
|
||||||
elseif rankType==RANK_TYPE.MONSTER_RANK then --心魔试炼
|
elseif rankType==RANK_TYPE.MONSTER_RANK then --心魔试炼
|
||||||
infoTxt.gameObject:SetActive(true)
|
infoTxt.gameObject:SetActive(true)
|
||||||
infoTxt.text=Language[11689].. data.rankInfo.param1
|
infoTxt.text=Language[11689].. data.rankInfo.param1
|
||||||
elseif rankType==RANK_TYPE.FIGHTLEVEL_STAR or rankType==RANK_TYPE.UpStar then --山河社稷图 升星排行
|
elseif rankType==RANK_TYPE.FIGHTLEVEL_STAR then --山河社稷图 升星排行
|
||||||
starImg:SetActive(true)
|
starImg:SetActive(true)
|
||||||
infoTxt.gameObject:SetActive(true)
|
infoTxt.gameObject:SetActive(true)
|
||||||
infoTxt.text= data.rankInfo.param1
|
infoTxt.text= data.rankInfo.param1
|
||||||
|
@ -320,6 +327,9 @@ function this.UpdateRankInfo(go,data)
|
||||||
elseif rankType==RANK_TYPE.SoulSign then
|
elseif rankType==RANK_TYPE.SoulSign then
|
||||||
infoTxt.gameObject:SetActive(true)
|
infoTxt.gameObject:SetActive(true)
|
||||||
infoTxt.text="魂印:"..data.rankInfo.param1
|
infoTxt.text="魂印:"..data.rankInfo.param1
|
||||||
|
elseif rankType==RANK_TYPE.UpStar then
|
||||||
|
infoTxt.gameObject:SetActive(true)
|
||||||
|
infoTxt.text="英雄:"..data.rankInfo.param1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue