孙悟空引导上传
parent
6749638de4
commit
0101a1461b
|
@ -74,7 +74,7 @@ function this.OnLevelChange()
|
|||
end
|
||||
this.CheckFuncGuide()
|
||||
--解开孙悟空封印的剧情
|
||||
-- StoryMapManager.isShowStory = 1
|
||||
StoryMapManager.isShowStory = 1
|
||||
elseif PlayerManager.level == 15 then
|
||||
--StoryMapManager.isShowStory = 3
|
||||
elseif CheckFunctionOpen(FUNCTION_OPEN_TYPE.hunyin) then --魂印功能 引导商店魂印页签
|
||||
|
|
|
@ -528,6 +528,48 @@ function this.ExecuteBehavior(beType, beArgs)
|
|||
maxRound = 20
|
||||
}
|
||||
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test)
|
||||
elseif beType == 21 then -- 进入假战斗
|
||||
this.dialogRoot:SetActive(false)
|
||||
this.mask:SetActive(false)
|
||||
this.tipButtomRoot:SetActive(false)
|
||||
this.gameObject:GetComponent("Image").raycastTarget = false
|
||||
|
||||
-- 条件节点
|
||||
local conditions = {}
|
||||
local strs = string.split(beArgs, "|")
|
||||
for i, s in ipairs(strs) do
|
||||
local ss = string.split(s, "#")
|
||||
table.insert(conditions, { tonumber(ss[1]), tonumber(ss[2]) })
|
||||
end
|
||||
|
||||
-- 检测是否有在最上层的界面
|
||||
--[[
|
||||
for _, c in ipairs(conditions) do
|
||||
local panel = c[1]
|
||||
local nextId = c[2]
|
||||
|
||||
if UIManager.IsTopShow(panel) then
|
||||
this.NextGuide(nextId)
|
||||
return
|
||||
end
|
||||
end
|
||||
]]
|
||||
-- 当有符合条件的界面时
|
||||
local function OnFocus(id)
|
||||
if not UIManager.IsTopShow(id) then return end
|
||||
Timer.New(function()
|
||||
for _, c in ipairs(conditions) do
|
||||
local panel = c[1]
|
||||
local nextId = c[2]
|
||||
if id == panel and UIManager.IsTopShow(panel) then
|
||||
this.ShowStory(nextId, OnFocus)
|
||||
return
|
||||
end
|
||||
end
|
||||
end, 0.2, 1):Start()
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, OnFocus)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnFocus, OnFocus)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue