From cad4f57850f41890c11902289638253e40237acc Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 28 Apr 2021 00:14:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=A4=A9=E5=B0=8A=E9=99=8D?= =?UTF-8?q?=E4=B8=96=E7=9A=84=E5=89=A7=E6=83=85=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guide/GuidePanel.lua | 2 +- .../~Lua/Modules/Popup/SupremeHeroPopup.lua | 34 ++++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index 684e570194..37ad257e40 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -478,7 +478,7 @@ function this.ShowStory(nextId,OnFocus) StoryMapManager.isShowStory = false local isShowStory = 1 if PlayerPrefs.HasKey("StoryMapPanel1"..PlayerManager.uid) then - isShowStory = PlayerPrefs.GetInt("StoryMapPanel"..PlayerManager.uid) + isShowStory = PlayerPrefs.GetInt("StoryMapPanel1"..PlayerManager.uid) end if isShowStory == 1 then LogGreen("this.gameObject:"..this.gameObject.name) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index 2456ae4c36..d31844c0a9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -181,18 +181,34 @@ function SupremeHeroPopup:OnOpen(_fun) fun = _fun end +function this.ShowStory() + local isShowStory = 1 + if PlayerPrefs.HasKey("StoryMapPanel2"..PlayerManager.uid) then + isShowStory = PlayerPrefs.GetInt("StoryMapPanel2"..PlayerManager.uid) + end + if isShowStory == 1 then + Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,this.InitShowPanel) + PlayerPrefs.SetInt("StoryMapPanel2"..PlayerManager.uid,0) + StoryMapManager.InitData(1) + else + this.InitShowPanel() + end +end + function SupremeHeroPopup:OnShow() actIsDone = false - --初始化静态显示数据 - this.InitShow() - - canClose = false - this.effectTime = nil - this.effectTime = Timer.New(function () - canClose = true - end, 1.2) - this.effectTime:Start() + this.ShowStory() +end +function this.InitShowPanel() + --初始化静态显示数据 + this.InitShow() + canClose = false + this.effectTime = nil + this.effectTime = Timer.New(function () + canClose = true + end, 1.2) + this.effectTime:Start() end function this.InitShow()