From 36bc9a16eb8bffe5bce9f6402988b83393cf6ab0 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 3 Nov 2022 13:20:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=9C=8D=E5=86=B2=E6=A6=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/NewShenZun/ActivityChongRank.lua | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/NewShenZun/ActivityChongRank.lua b/Assets/ManagedResources/~Lua/Modules/NewShenZun/ActivityChongRank.lua index 067484dc96..66a17c211c 100644 --- a/Assets/ManagedResources/~Lua/Modules/NewShenZun/ActivityChongRank.lua +++ b/Assets/ManagedResources/~Lua/Modules/NewShenZun/ActivityChongRank.lua @@ -5,6 +5,7 @@ local this=ActivityChongRank local infoConfig=ConfigManager.GetConfig(ConfigName.ChongRankInfo) local rankConfig=ConfigManager.GetConfig(ConfigName.ChongRank) local curConfig=nil +local currId=0 local type=0 local btnType=0 local rankType=0 @@ -51,6 +52,7 @@ function this:InitComponent() local closeTime=this.actData.startTime+configInfo.CloseTime if GetTimeStamp()>=openTime and GetTimeStamp()<=closeTime then --活动未开启 curConfig=configInfo + currId=curConfig.Id isFirst=true end table.insert(this.btnList,tabBtn) @@ -70,16 +72,7 @@ function this:OnShow() end 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 openTime=this.actData.startTime+config.OpenTime local closeTime=this.actData.startTime+config.CloseTime @@ -94,6 +87,20 @@ function this.TabBtnOnClick(config,btn) time=0 state=3 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 this.leftTimeTxt.text = string.format("活动开始倒计时:".."%s",TimeToFelaxible(time)) elseif state==2 then @@ -310,7 +317,7 @@ function this.UpdateRankInfo(go,data) elseif rankType==RANK_TYPE.MONSTER_RANK then --心魔试炼 infoTxt.gameObject:SetActive(true) 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) infoTxt.gameObject:SetActive(true) infoTxt.text= data.rankInfo.param1 @@ -320,6 +327,9 @@ function this.UpdateRankInfo(go,data) elseif rankType==RANK_TYPE.SoulSign then infoTxt.gameObject:SetActive(true) infoTxt.text="魂印:"..data.rankInfo.param1 + elseif rankType==RANK_TYPE.UpStar then + infoTxt.gameObject:SetActive(true) + infoTxt.text="英雄:"..data.rankInfo.param1 end