From b73735f7cb26b8e7d4e32e1fa6008f83efb86746 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Fri, 4 Nov 2022 15:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E5=86=B2=E7=89=B9=E6=9D=83=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E9=80=9A=E5=85=B3=E6=9F=90=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/GMPanel/GMShuaChongTeQuan.prefab | 2 +- .../Modules/Fight/FightPointPassManager.lua | 23 ++++++++++--------- .../Modules/Operating/GMShuaChongTeQuan.lua | 7 ++++++ 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/GMPanel/GMShuaChongTeQuan.prefab b/Assets/ManagedResources/Prefabs/UI/GMPanel/GMShuaChongTeQuan.prefab index 1389504802..caff797e73 100644 --- a/Assets/ManagedResources/Prefabs/UI/GMPanel/GMShuaChongTeQuan.prefab +++ b/Assets/ManagedResources/Prefabs/UI/GMPanel/GMShuaChongTeQuan.prefab @@ -12,7 +12,7 @@ GameObject: - component: {fileID: 5282930794667940139} - component: {fileID: 3567283505001742107} m_Layer: 5 - m_Name: Rewardbg (1) + m_Name: Rewardbg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassManager.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassManager.lua index 14381e65d8..0206426332 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassManager.lua @@ -109,26 +109,27 @@ end function this.IsFightPointPass(fightId) local isPass = false local curDiff = mainLevelConfig[this.curOpenFight].Difficulty - local judgeDiff = mainLevelConfig[fightId].Difficulty - if curDiff == judgeDiff then + if mainLevelConfig[fightId] then + local judgeDiff = mainLevelConfig[fightId].Difficulty + if curDiff == judgeDiff then - if fightId < this.curOpenFight then - isPass = true - elseif fightId == this.curOpenFight then - if this.curFightState == 2 then -- 最后一章的最后一关 + if fightId < this.curOpenFight then isPass = true + elseif fightId == this.curOpenFight then + if this.curFightState == 2 then -- 最后一章的最后一关 + isPass = true + else + isPass = false + end else isPass = false end + elseif curDiff > judgeDiff then + isPass = true else isPass = false end - elseif curDiff > judgeDiff then - isPass = true - else - isPass = false end - return isPass end diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/GMShuaChongTeQuan.lua b/Assets/ManagedResources/~Lua/Modules/Operating/GMShuaChongTeQuan.lua index b271623aac..ed63ceef14 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/GMShuaChongTeQuan.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/GMShuaChongTeQuan.lua @@ -37,6 +37,8 @@ function GMShuaChongTeQuan:InitComponent() self.rewardGrid=Util.GetGameObject(self.gameObject, "bg1/bg2/Reward") self.dayGrid=Util.GetGameObject(self.gameObject, "bg1/bg2/dayReward") self.payTxt=Util.GetGameObject(self.gameObject, "bg1/bg2/btn_buy/Text"):GetComponent("Text") + self.hint2Txt=Util.GetGameObject(self.gameObject, "bg1/bg2/Rewardbg/Text"):GetComponent("Text") + self.oldPriceTxt=Util.GetGameObject(self.gameObject, "bg1/bg2/btn_buy/old_buy"):GetComponent("Text") local rootHight = self.infoGrid.transform.rect.height local width = self.infoGrid.transform.rect.width self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.infoGrid.transform,self.infoPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0,0)) @@ -58,12 +60,17 @@ function GMShuaChongTeQuan:InitComponent() local len=#recharge.OpenPrivilege local mission=ActivityGiftManager.GetActivityInfo(ActivityTypeDef.shuaChongTeQuan,activityId) local state=mission.state + self.oldPriceTxt.text=recharge.Price*10 .."元" if state==0 then self.payTxt.text=recharge.Price.."元" + self.hint2Txt.gameObject:SetActive(true) + self.hint2Txt.text="已累计"..mission.progress.."天奖励,奖励最多累计30天" elseif state==1 then self.payTxt.text="领取" + self.hint2Txt.gameObject:SetActive(false) elseif state==2 then self.payTxt.text="已领取" + self.hint2Txt.gameObject:SetActive(false) end if _index>1 then local lastId=_TabData[_index-1].id