【引导】通过关卡时引导添加

dev_chengFeng
gaoxin 2021-11-12 14:52:30 +08:00
parent f6a6512c4b
commit 1d22b10e61
3 changed files with 24 additions and 1 deletions

View File

@ -140,6 +140,7 @@ function this.RefreshFightId(msg)
PlayerPrefs.SetInt(PlayerManager.uid .. OLD_ID, oldFight)
-- 最后一关更新
--if data.NextLevel ~= -1 then
Game.GlobalEvent:DispatchEvent(GameEvent.Mission.OnPassFight, oldFight)
-- 服务器更新关卡状态
this.curOpenFight = msg.fightId

View File

@ -3,6 +3,7 @@ local this = GuideManager
local GuideConfig = ConfigManager.GetConfig(ConfigName.GuideConfig)
local GlobalSystemConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig)
local SpecialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
local MainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
local openDic = {}
local funcDic = {}
@ -18,6 +19,7 @@ function this.Initialize()
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
Game.GlobalEvent:AddEvent(GameEvent.Practice.PracticeGuide,this.PracticeGuideFun)
Game.GlobalEvent:AddEvent(GameEvent.EndLess.GuidePanel,this.EndlessGuideFun)
Game.GlobalEvent:AddEvent(GameEvent.Mission.OnPassFight,this.OnFightPass)
end
this.IsFirstOpenHarmonyBei = false
@ -106,6 +108,22 @@ function this.OnFunctionOpen(funcId)
this.CheckFuncGuide()
end
-- 通过关卡时判断
function this.OnFightPass(fightId)
if not fightId then return end
if not AppConst.isGuide then
return
end
local guideId = MainLevelConfig[fightId].PassGuideId
if not guideId or guideId == 0 then
return
end
-- if not funcDic[guideId] then
table.insert(_FuncGuideList, guideId)
-- end
--
this.CheckFuncGuide()
end
-- 将引导加入引导队列

View File

@ -211,7 +211,11 @@ function this.RefreshPanel(eventId, isFirstOpen)
-- 显示立绘
if resId > 0 and resId ~= 999 then
local data = artResConfig[resId]
if NameManager.roleName == tostring(PlayerManager.uid) then
this.RoleName.text =string.gsub(GetLanguageStrById(data.Desc), Language[11252], "")
else
this.RoleName.text =string.gsub(GetLanguageStrById(data.Desc), Language[11252], NameManager.roleName)
end
-- 初始化特效
StoryManager.InitEffect(this.effectRoot)