【剧情】修复连续播放两个剧情导致重复引导首充的问题

dev_chengFeng
gaoxin 2021-04-28 05:43:52 +08:00
parent 3bde92fa6e
commit 262b07d1af
1 changed files with 6 additions and 5 deletions

View File

@ -483,9 +483,11 @@ function this.ShowStory(nextId,OnFocus)
if isShowStory == 1 then
LogGreen("this.gameObject:"..this.gameObject.name)
this.gameObject:SetActive(false)
Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,function()
this.GameSetActive(nextId,OnFocus)
end)
local function onCloseStoryMapPanel()
this.GameSetActive(nextId, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel)
end
Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel)
PlayerPrefs.SetInt("StoryMapPanel1"..PlayerManager.uid,0)
StoryMapManager.InitData(1)
else
@ -500,9 +502,8 @@ function this.ShowStory(nextId,OnFocus)
end
end
function this.GameSetActive(nextId,OnFocus)
function this.GameSetActive(nextId, OnFocus)
this.gameObject:SetActive(true)
Game.GlobalEvent:RemoveEvent(GameEvent.GuaJi.CloseStoryMapPanel,this.GameSetActive)
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnFocus, OnFocus)