From 9a61e6b709ace675cc061a0cce055eb5b1aa6eb5 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 9 Jun 2021 12:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E3=80=91=E5=8F=AA=E6=9C=89=E7=AC=AC=E4=B8=80=E6=AC=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BB=BB=E5=8A=A1=E4=BC=9A=E6=9C=89=E5=85=89=E6=95=88?= =?UTF-8?q?=EF=BC=8C=E5=90=8E=E7=BB=AD=E5=AE=8C=E6=88=90=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Map/EndLessMapManager.lua | 5 +++++ .../~Lua/Modules/Map/View/EndLessMapView.lua | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua index f2654ab899..2a5911b38c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua @@ -702,6 +702,7 @@ function this.SetRewardData() v.state = 0 elseif allMissionData[j].state == 1 then -- goText.text="领取" + v.progress = v.value v.state = allMissionData[j].state elseif allMissionData[j].state == 0 then -- goText.text="前往" @@ -712,6 +713,7 @@ function this.SetRewardData() end end end + local typeIndex = { [0] = 2, [1] = 0, @@ -724,6 +726,9 @@ function this.SetRewardData() return typeIndex[a.state] < typeIndex[b.state] end end) + + CheckRedPointStatus(RedPointType.wujinMission) + CheckRedPointStatus(RedPointType.EndlessPanel) return this.mission end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index a8f7540542..47b5711a0c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -208,7 +208,6 @@ function EndLessMapView:BindEvent() -- end UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.WuJinShuXing,data) end) - BindRedPointObject(RedPointType.wujinTreasure,this.endLessTreasureRed) Util.AddClick(this.endLessTreasure, function () if ctrlView.GetCallListCount() > 1 then PopupTipPanel.ShowTip(Language[11259]) @@ -342,12 +341,14 @@ end function EndLessMapView:OnShow() if not this:IsEndLessMap() then return end + -- 避免其他界面打开时不刷新问题 -- 界面再次打开时,如果没有主动刷新过,则不需要刷新显示 --if not EndLessMapManager.isUpdateOnClose and not EndLessMapManager.openedFormat then -- this:GetBagEnergy() -- EndLessMapManager.isUpdateOnClose = false --end + BindRedPointObject(RedPointType.wujinTreasure,this.endLessTreasureRed) BindRedPointObject(RedPointType.wujinBianDui,this.btnFormatRed) -- 如果全屏界面打开时刷新过,重新激活界面需要刷新一次 if EndLessMapManager.isUpdateOnClose then @@ -426,7 +427,6 @@ function EndLessMapView:RefreshTargetRoote() -- 1 "领取" -- 2 "前往" this.curMission = EndLessMapManager.GetRewardData() - LogGreen(this.curMission.state.." this.curMission.state") if this.curMission.state == 2 then this.TargetBtn1.gameObject:SetActive(true) --未完成 this.TargetBtn2.gameObject:SetActive(false) --以达成 @@ -748,6 +748,8 @@ function EndLessMapView:OnClose() -- this.warn:SetActive(false) Util.ClearChild(this.selectHeroGrid.transform) ClearRedPointObject(RedPointType.wujinBianDui,this.btnFormatRed) + ClearRedPointObject(RedPointType.wujinTreasure,this.endLessTreasureRed) + ClearRedPointObject(RedPointType.wujinMission,this.btnNoteRed) this.heroList = {} this.isPanelClose = true EndLessMapManager.isUpdateOnClose = false @@ -776,8 +778,7 @@ end function EndLessMapView:OnDestroy() this.spLoader:Destroy() if not this:IsEndLessMap() then return end - ClearRedPointObject(RedPointType.wujinTreasure,this.endLessTreasureRed) - ClearRedPointObject(RedPointType.wujinMission,this.btnNoteRed) + end return EndLessMapView