Files
SL1900 5e0d58cfad Initial version - 1.2.0.60
EN: 1.2.0.60
CN: 1.2.0.61
JP: 1.2.0.63
KR: 1.2.0.67
2025-12-03 01:00:00 +09:00

104 lines
2.9 KiB
Lua

local GuideGroup_229 = class("GuideGroup_229")
local TimerManager = require("GameCore.Timer.TimerManager")
local TimerScaleType = require("GameCore.Timer.TimerScaleType")
local mapEventConfig = {}
local groupId = 229
local totalStep = 2
local current = 1
function GuideGroup_229:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_229:BindEvent()
if type(mapEventConfig) ~= "table" then
return
end
for nEventId, sCallbackName in pairs(mapEventConfig) do
local callback = self[sCallbackName]
if type(callback) == "function" then
EventManager.Add(nEventId, self, callback)
end
end
end
function GuideGroup_229:UnBindEvent()
if type(mapEventConfig) ~= "table" then
return
end
for nEventId, sCallbackName in pairs(mapEventConfig) do
local callback = self[sCallbackName]
if type(callback) == "function" then
EventManager.Remove(nEventId, self, callback)
end
end
end
function GuideGroup_229:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_229:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_229:Step_1()
self.msg = {
BindIcon = "DiscSkillActivePanel/----SafeAreaRoot----/goNoteList/noteListSv/Viewport/noteContent/goNoteItem(Clone)",
Deviation = {0, 0},
Desc = "Guide_229_1",
DescDeviation = {0, -440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.2
if self.waitAnimTime ~= 0 then
TimerManager.Add(1, self.waitAnimTime + 0.2, self, function()
self.parent:PlayTypeMask(self.msg)
end, true, false, false)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_229:Step_2()
local tempRoot = GameObject.Find("---- UI ----").transform
local btn = tempRoot:Find("DiscSkillActivePanel/btnBg"):GetComponent("Button")
btn.onClick:Invoke()
self.msg = {
BindIcon = "DiscSkillActivePanel/----SafeAreaRoot----/goSkillList/skillListSv/Viewport/skillContent/goSkillItem(Clone)",
Deviation = {0, 0},
Desc = "Guide_229_2",
DescDeviation = {0, -440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_229:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
self.nStarTowerGroupId = 0
if current == 1 then
self:SendGuideStep(-1)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
TimerManager.Add(1, self.waitAnimTime + 0.2, self, function()
self.parent:PlayTypeMask(self.msg)
end, true, false, false)
end
end
return GuideGroup_229