修改剧情入口

dev_chengFeng
jiaoyangna 2021-04-29 17:00:12 +08:00
parent 8c7208dff3
commit ed9c058ece
4 changed files with 11 additions and 23 deletions

View File

@ -44,8 +44,10 @@ function this.OnLevelChange()
-- 首充引导特殊处理到十级开放
if PlayerManager.level == 10 then
table.insert(_FuncGuideList, 100200)
StoryMapManager.isShowStory = true
StoryMapManager.isShowStory = 1
this.CheckFuncGuide()
elseif PlayerManager.level == 22 then
StoryMapManager.isShowStory = 3
end
end
--

View File

@ -474,11 +474,11 @@ function this.ExecuteBehavior(beType, beArgs)
end
function this.ShowStory(nextId,OnFocus)
if StoryMapManager.isShowStory then
StoryMapManager.isShowStory = false
if StoryMapManager.isShowStory ~= 0 then
StoryMapManager.isShowStory = 0
local isShowStory = 1
if PlayerPrefs.HasKey("StoryMapPanel1"..PlayerManager.uid) then
isShowStory = PlayerPrefs.GetInt("StoryMapPanel1"..PlayerManager.uid)
if PlayerPrefs.HasKey("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid) then
isShowStory = PlayerPrefs.GetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid)
end
if isShowStory == 1 then
LogGreen("this.gameObject:"..this.gameObject.name)
@ -488,8 +488,8 @@ function this.ShowStory(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)
PlayerPrefs.SetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid,0)
StoryMapManager.InitData(StoryMapManager.isShowStory)
else
this.NextGuide(nextId)
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus)

View File

@ -181,23 +181,9 @@ 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(3)
else
this.InitShowPanel()
end
end
function SupremeHeroPopup:OnShow()
actIsDone = false
this.ShowStory()
this.InitShowPanel()
end
function this.InitShowPanel()

View File

@ -1,7 +1,7 @@
StoryMapManager = {}
local this = StoryMapManager
this.groupConfigs = {}
this.isShowStory = false
this.isShowStory = 0
local storyMapConfig = ConfigManager.GetConfig(ConfigName.StoryMapConfig)
--初始化
function this.Initialize()