【引导】副本前引导添加
parent
075de29090
commit
93640449f3
|
@ -27,6 +27,7 @@ GameEvent = {
|
||||||
GuidePanelScrollViewPos = "Guide.GuidePanelScrollViewPos",
|
GuidePanelScrollViewPos = "Guide.GuidePanelScrollViewPos",
|
||||||
|
|
||||||
BattleGuideDone = "Guide.BattleGuideDone",
|
BattleGuideDone = "Guide.BattleGuideDone",
|
||||||
|
FuncGuideDone = "Guide.FuncGuideDone",
|
||||||
},
|
},
|
||||||
Player = {
|
Player = {
|
||||||
--金币数量改变
|
--金币数量改变
|
||||||
|
|
|
@ -694,8 +694,10 @@ function this.ExcuteBattle()
|
||||||
PopupTipPanel.ShowTip(tip)
|
PopupTipPanel.ShowTip(tip)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
-- 检测是否有前置引导
|
||||||
|
GuideManager.BeforeFightCheck(curFightId, function()
|
||||||
this.SetInitAnim()
|
this.SetInitAnim()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -118,10 +118,48 @@ function this.OnFightPass(fightId)
|
||||||
if not guideId or guideId == 0 then
|
if not guideId or guideId == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- if not funcDic[guideId] then
|
if funcDic[guideId] then
|
||||||
table.insert(_FuncGuideList, guideId)
|
-- funcDic[guideId] = nil
|
||||||
-- end
|
return
|
||||||
|
end
|
||||||
--
|
--
|
||||||
|
table.insert(_FuncGuideList, guideId)
|
||||||
|
this.CheckFuncGuide()
|
||||||
|
end
|
||||||
|
-- 通过关卡时判断
|
||||||
|
function this.BeforeFightCheck(fightId, func)
|
||||||
|
-- 引导完成
|
||||||
|
local function OnFuncGuideDone()
|
||||||
|
if func then
|
||||||
|
func()
|
||||||
|
end
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.Guide.FuncGuideDone, OnFuncGuideDone)
|
||||||
|
end
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.Guide.FuncGuideDone, OnFuncGuideDone)
|
||||||
|
-- 正确性检测
|
||||||
|
if not fightId then
|
||||||
|
OnFuncGuideDone()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 是否开启引导
|
||||||
|
if not AppConst.isGuide then
|
||||||
|
OnFuncGuideDone()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 判断是否需要引导
|
||||||
|
local guideId = MainLevelConfig[fightId].BeforeGuideId
|
||||||
|
if not guideId or guideId == 0 then
|
||||||
|
OnFuncGuideDone()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 引导过了
|
||||||
|
if funcDic[guideId] then
|
||||||
|
-- funcDic[guideId] = nil
|
||||||
|
OnFuncGuideDone()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 功能引导检测
|
||||||
|
table.insert(_FuncGuideList, guideId)
|
||||||
this.CheckFuncGuide()
|
this.CheckFuncGuide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -182,6 +220,8 @@ function GuideManager.CheckFuncGuide()
|
||||||
GuideManager.ShowGuide(guideId)
|
GuideManager.ShowGuide(guideId)
|
||||||
end
|
end
|
||||||
table.remove(_FuncGuideList, 1)
|
table.remove(_FuncGuideList, 1)
|
||||||
|
else
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.Guide.FuncGuideDone)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue