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
This commit is contained in:
SL1900
2025-12-03 01:00:00 +09:00
commit 5e0d58cfad
3595 changed files with 9373562 additions and 0 deletions
+520
View File
@@ -0,0 +1,520 @@
local GuideCtrl = class("GuideCtrl", BaseCtrl)
local WwiseAudioMgr = CS.WwiseAudioManager.Instance
local TimerManager = require("GameCore.Timer.TimerManager")
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
local SDKManager = CS.SDKManager.Instance
GuideCtrl._mapNodeConfig = {
GuideUIHelp = {sComponentName = "GameObject"},
btnHide = {sComponentName = "GameObject"},
btnTempRect = {
sNodeName = "btnTemp",
sComponentName = "RectTransform"
},
btnTemp = {sComponentName = "UIButton"},
typeMask = {sComponentName = "GameObject"},
imgLeft = {
sComponentName = "RectTransform"
},
imgRight = {
sComponentName = "RectTransform"
},
imgTop = {
sComponentName = "RectTransform"
},
imgBottom = {
sComponentName = "RectTransform"
},
imgMiddle = {
sComponentName = "RectTransform"
},
ani_Middle = {sNodeName = "imgMiddle", sComponentName = "Animator"},
imgHand = {
sComponentName = "RectTransform"
},
imgHand1 = {sComponentName = "Canvas"},
obj_texBgCanvas = {sNodeName = "obj_texBg", sComponentName = "Canvas"},
obj_texBg = {
sComponentName = "RectTransform"
},
imgHead = {sComponentName = "Image"},
texDesc = {sComponentName = "TMP_Text"},
texDescNoneHead = {sComponentName = "TMP_Text"},
btnClose = {
sComponentName = "UIButton",
callback = "FinishCurrentStep"
},
btnCount = {
sComponentName = "UIButton",
callback = "OnClickCount"
},
btnJump = {
sComponentName = "UIButton",
callback = "OnClickJump"
},
txtJump = {sComponentName = "TMP_Text", sLanguageId = "Guide_Jump"},
canvasBtnClose = {sNodeName = "btnClose", sComponentName = "Canvas"},
btnShortcutClose = {
sComponentName = "NaviButton",
sAction = "Confirm",
callback = "FinishCurrentStep"
},
blur = {},
aniBlur = {sNodeName = "blur", sComponentName = "Animator"},
EditorDebug = {sComponentName = "GameObject"},
InputFieldDebug = {sComponentName = "InputField"},
InputFieldStep = {sComponentName = "InputField"},
InputFieldPassive = {sComponentName = "InputField"},
btnEditorDebug = {
sComponentName = "UIButton",
callback = "DebugEditorStep"
},
btnEditorClear = {
sComponentName = "UIButton",
callback = "DebugEditorClear"
}
}
GuideCtrl._mapEventConfig = {
Event_ActiveGuidePanel = "ActiveGuidePanelEvent",
Event_DeActiveGuidePanel = "DeActiveGuidePanelEvent",
Event_ActiveHide = "ActiveHide",
NewDay_Clear_Guide = "NewDayClearGuide",
StoryDialog_DialogEnd = "OnEvent_StoryDialog_DialogEnd"
}
local clickCount = 0
local maxClickCount = 15
local maxWaitTimeEnd = false
local maxWaitTime = 20
function GuideCtrl:Awake()
self.isDebugTest = false
maxClickCount = ConfigTable.GetConfigNumber("GuideMaxClickCount")
maxWaitTime = ConfigTable.GetConfigNumber("GuideMaxWaitTime")
self.GuideUIHelpCS = self._mapNode.GuideUIHelp:GetComponent("GuideUIHelp")
self.doGuideData = nil
self.addClickCb = nil
self.waitStep = nil
self.tbGamepadUINode = self:GetGamepadUINode()
end
function GuideCtrl:OnEnable()
NovaAPI.SetCanvasOverrideSorting(self._mapNode.imgHand1, true)
NovaAPI.SetCanvasSortingName(self._mapNode.imgHand1, AllEnum.SortingLayerName.UI_Top)
NovaAPI.SetCanvasOverrideSorting(self._mapNode.obj_texBgCanvas, true)
NovaAPI.SetCanvasSortingName(self._mapNode.obj_texBgCanvas, AllEnum.SortingLayerName.UI_Top)
NovaAPI.SetCanvasSortingOrder(self._mapNode.canvasBtnClose, self._nSortingOrder + 15)
self._mapNode.EditorDebug:SetActive(false)
self._mapNode.typeMask:SetActive(false)
self._mapNode.btnClose.gameObject:SetActive(false)
self._mapNode.btnCount.gameObject:SetActive(false)
end
function GuideCtrl:ActiveGuidePanelEvent()
self._mapNode.btnHide:SetActive(true)
self.gameObject:SetActive(true)
self:DoCurrentStepGuide()
end
function GuideCtrl:DeActiveGuidePanelEvent()
self._mapNode.btnHide:SetActive(false)
self.gameObject:SetActive(false)
end
function GuideCtrl:ActiveHide(isShow)
self._mapNode.btnHide:SetActive(isShow)
end
function GuideCtrl:DoCurrentStepGuide()
local gGroupData = ConfigTable.GetData("GuideGroup", PlayerData.Guide.runGroupId)
if gGroupData == nil then
traceback("无效的引导组id" .. tostring(PlayerData.Guide.runGroupId))
return
end
if self.isDebugTest then
package.loaded["Game.UI.Guide.GuideGruop." .. gGroupData.ScriptPath] = nil
end
local luaClass = require("Game.UI.Guide.GuideGruop." .. gGroupData.ScriptPath)
if luaClass == nil then
return
end
self.curGuide = luaClass
if type(self.curGuide.Init) == "function" then
self.curGuide:Init(self, PlayerData.Guide.runStepId)
end
end
function GuideCtrl:PlayTypeMask(msg)
self._mapNode.btnShortcutClose.gameObject:SetActive(GamepadUIManager.GetInputState())
if GamepadUIManager.GetInputState() then
GamepadUIManager.EnableGamepadUI("GuideCtrl", self.tbGamepadUINode)
end
self.tmpSort = nil
local nSort = NovaAPI.GetCanvasSortingOrder(self.gameObject:GetComponent("Canvas"))
if msg.tmpSort then
self.tmpSort = nSort
NovaAPI.SetCanvasSortingOrder(self.gameObject:GetComponent("Canvas"), msg.tmpSort + 100)
NovaAPI.SetCanvasSortingOrder(self._mapNode.imgHand1, msg.tmpSort + 115)
NovaAPI.SetCanvasSortingOrder(self._mapNode.obj_texBgCanvas, msg.tmpSort + 115)
else
NovaAPI.SetCanvasSortingOrder(self._mapNode.imgHand1, nSort + 15)
NovaAPI.SetCanvasSortingOrder(self._mapNode.obj_texBgCanvas, nSort + 15)
end
self.pre = self.gameObject.transform.localScale.x
self._mapNode.typeMask:SetActive(false)
self._mapNode.btnClose.gameObject:SetActive(false)
self._mapNode.btnCount.gameObject:SetActive(false)
self._mapNode.btnJump.gameObject:SetActive(false)
self._mapNode.btnTempRect.gameObject:SetActive(false)
clickCount = 0
maxWaitTimeEnd = false
self.doMsg = msg
self._mapNode.btnHide:SetActive(true)
self.gameObject:SetActive(true)
self._mapNode.imgHand.gameObject:SetActive(false)
self._mapNode.typeMask:SetActive(true)
local tempRoot = GameObject.Find("---- UI ----").transform
if msg.isUITop then
tempRoot = GameObject.Find("---- UI TOP ----").transform
end
local wait = function()
maxWaitTimeEnd = true
if clickCount > maxClickCount then
local nSort = NovaAPI.GetCanvasSortingOrder(self.gameObject:GetComponent("Canvas"))
NovaAPI.SetCanvasSortingOrder(self._mapNode.btnJump.gameObject:GetComponent("Canvas"), nSort + 16)
NovaAPI.SetCanvasSortingName(self._mapNode.btnJump.gameObject:GetComponent("Canvas"), AllEnum.SortingLayerName.UI_Top)
self._mapNode.btnJump.gameObject:SetActive(true)
end
end
self.waitStep = TimerManager.Add(1, maxWaitTime, self, wait, true, true, true, nil)
local objTemp = tempRoot:Find(msg.BindIcon)
if msg.Child then
objTemp = objTemp.transform:GetChild(msg.Child).gameObject
end
local closeObj
if msg.CloseObj then
closeObj = tempRoot:Find(msg.CloseObj)
if closeObj then
closeObj.gameObject:SetActive(false)
end
end
local deActiveBtnObj
if msg.DeActiveBtn then
deActiveBtnObj = tempRoot:Find(msg.DeActiveBtn):GetComponent("UIButton")
if deActiveBtnObj then
deActiveBtnObj.enabled = false
end
end
if objTemp == nil then
self:SendGuideStep(PlayerData.Guide.runGroupId, -1)
self:ClearCurGuide(true)
printError("没有找打引导的图标 === " .. msg.BindIcon)
return
else
self.objGuild = objTemp:GetComponent("RectTransform")
end
if msg.ScrollView then
self.objScrollView = tempRoot:Find(msg.ScrollView):GetComponent("ScrollRect")
NovaAPI.SetComponentEnable(self.objScrollView, false)
end
local sizeX = 0
local sizeY = 0
if not msg.Size then
local objRect = self.objGuild.gameObject:GetComponent("RectTransform")
sizeX = objRect.rect.width + 10
sizeY = objRect.rect.height + 10
if msg.AutoDeviationCenter then
msg.Deviation[1] = sizeX / 2 + msg.Deviation[1]
msg.Deviation[2] = -sizeY / 2 + msg.Deviation[2]
elseif msg.AutoDeviationBottom then
msg.Deviation[2] = -sizeY / 2 + msg.Deviation[2]
elseif msg.AutoDeviationTop then
msg.Deviation[2] = sizeY / 2 + msg.Deviation[2]
end
else
sizeX = msg.Size[1]
sizeY = msg.Size[2]
end
self._mapNode.imgMiddle.gameObject:SetActive(msg.isNoMiddle == nil)
local sizeXPre = sizeX * self.pre
local sizeYPre = sizeY * self.pre
local offsetXPre = msg.Deviation[1] * self.pre
local offsetYPre = msg.Deviation[2] * self.pre
local objGuildPos = self.objGuild.position
self._mapNode.imgLeft.position = Vector3(objGuildPos.x + offsetXPre - sizeXPre / 2 - self._mapNode.imgLeft.sizeDelta.x / 2 * self.pre, 0, 0)
self._mapNode.imgRight.position = Vector3(objGuildPos.x + offsetXPre + sizeXPre / 2 + self._mapNode.imgRight.sizeDelta.x / 2 * self.pre, 0, 0)
self._mapNode.imgLeft.localPosition = Vector3(self._mapNode.imgLeft.localPosition.x + 3, 0, 0)
self._mapNode.imgRight.localPosition = Vector3(self._mapNode.imgRight.localPosition.x - 3, 0, 0)
self._mapNode.imgTop.sizeDelta = Vector2(sizeX - 6, 1500)
self._mapNode.imgTop.position = Vector3(objGuildPos.x + offsetXPre, objGuildPos.y + offsetYPre + sizeYPre / 2 + self._mapNode.imgTop.sizeDelta.y / 2 * self.pre, 0)
self._mapNode.imgBottom.sizeDelta = Vector2(sizeX - 6, 1500)
self._mapNode.imgBottom.position = Vector3(objGuildPos.x + offsetXPre, objGuildPos.y + offsetYPre - sizeYPre / 2 - self._mapNode.imgBottom.sizeDelta.y / 2 * self.pre, 0)
self._mapNode.imgTop.localPosition = Vector3(self._mapNode.imgTop.localPosition.x, self._mapNode.imgTop.localPosition.y - 3, 0)
self._mapNode.imgBottom.localPosition = Vector3(self._mapNode.imgBottom.localPosition.x, self._mapNode.imgBottom.localPosition.y + 3, 0)
self._mapNode.imgMiddle.sizeDelta = Vector2(sizeX, sizeY)
self._mapNode.imgMiddle.position = objGuildPos + Vector3(offsetXPre, offsetYPre, 0)
if msg.Type == GameEnum.guidetype.ForcedClick then
self.GuideUIHelpCS:AddCanvas(self.objGuild.gameObject)
NovaAPI.SetCanvasSortingOrder(self._mapNode.btnCount.gameObject:GetComponent("Canvas"), nSort + 8)
self._mapNode.btnCount.gameObject:SetActive(true)
if msg.CallB then
self._mapNode.btnTempRect.gameObject:SetActive(true)
function self.addClickCb()
if closeObj then
closeObj.gameObject:SetActive(true)
end
if deActiveBtnObj then
deActiveBtnObj.enabled = true
end
msg.CallB()
self:FinishCurrentStep()
end
self._mapNode.btnTemp.onClick:AddListener(self.addClickCb)
self._mapNode.btnTempRect.sizeDelta = Vector2(sizeX, sizeY)
self._mapNode.btnTempRect.position = objGuildPos + Vector3(offsetXPre, offsetYPre, 0)
local objBtnTempCanvase = self._mapNode.btnTempRect.gameObject:GetComponent("Canvas")
NovaAPI.SetCanvasSortingOrder(objBtnTempCanvase, nSort + 16)
NovaAPI.SetCanvasSortingName(objBtnTempCanvase, AllEnum.SortingLayerName.UI_Top)
else
function self.addClickCb()
if closeObj then
closeObj.gameObject:SetActive(true)
end
self:FinishCurrentStep()
end
self.objGuild:GetComponent("Button").onClick:AddListener(self.addClickCb)
end
self._mapNode.imgHand.gameObject:SetActive(true)
local offsetHandXPre = msg.HandDeviation[1] * self.pre
local offsetHandYPre = msg.HandDeviation[2] * self.pre
self._mapNode.imgHand.position = objGuildPos + Vector3(offsetHandXPre, offsetHandYPre, 0)
local _handRotation = 0
if msg.HandRotation then
_handRotation = msg.HandRotation
end
self._mapNode.imgHand.localRotation = Quaternion.Euler(0, 0, _handRotation)
self._mapNode.ani_Middle:Play("GuidePanelHandMiddle_inLoop")
WwiseAudioMgr:PlaySound("ui_common_guide_hint")
else
self._mapNode.ani_Middle:Play("GuidePanelHandMiddle_in")
WwiseAudioMgr:PlaySound("ui_common_guide_hint")
end
if msg.Type == GameEnum.guidetype.Introductory then
self._mapNode.btnClose.gameObject:SetActive(true)
if msg.isShowHand then
self._mapNode.imgHand.gameObject:SetActive(true)
local offsetHandXPre = msg.HandDeviation[1] * self.pre
local offsetHandYPre = msg.HandDeviation[2] * self.pre
self._mapNode.imgHand.position = objGuildPos + Vector3(offsetHandXPre, offsetHandYPre, 0)
local _handRotation = 0
if msg.HandRotation then
_handRotation = msg.HandRotation
end
self._mapNode.imgHand.localRotation = Quaternion.Euler(0, 0, _handRotation)
end
end
if msg.Desc then
self._mapNode.obj_texBg.gameObject:SetActive(true)
NovaAPI.SetTMPText(self._mapNode.texDesc, ConfigTable.GetUIText(msg.Desc))
NovaAPI.SetTMPText(self._mapNode.texDescNoneHead, ConfigTable.GetUIText(msg.Desc))
local offsetTexXPre = msg.DescDeviation[1] * self.pre
local offsetTexYPre = msg.DescDeviation[2] * self.pre
self._mapNode.obj_texBg.position = objGuildPos + Vector3(offsetTexXPre, offsetTexYPre, 0)
self._mapNode.texDesc.gameObject:SetActive(msg.Head)
self._mapNode.texDescNoneHead.gameObject:SetActive(not msg.Head)
if msg.Head then
self._mapNode.imgHead.gameObject:SetActive(true)
self:SetPngSprite(self._mapNode.imgHead, msg.Head .. AllEnum.CharHeadIconSurfix.GD)
else
self._mapNode.imgHead.gameObject:SetActive(false)
end
else
self._mapNode.obj_texBg.gameObject:SetActive(false)
end
end
function GuideCtrl:ShowTypePopPicture(DicId)
self._mapNode.btnHide:SetActive(false)
if DicId ~= nil then
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, DicId, true)
end
end
function GuideCtrl:PlayAvg(AvgId)
self:ActiveHide(false)
self._mapNode.blur:SetActive(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
EventManager.Hit("StoryDialog_DialogStart", AvgId)
end
cs_coroutine.start(wait)
end
function GuideCtrl:FinishCurrentStep()
self:QuitGamepadUI()
if self.objGuild then
if self.doMsg.Type == GameEnum.guidetype.ForcedClick then
self.GuideUIHelpCS:RemoveCanvas(self.objGuild.gameObject)
if self.doMsg.CallB then
self._mapNode.btnTempRect.gameObject:SetActive(false)
self._mapNode.btnTemp.onClick:RemoveListener(self.addClickCb)
else
self.objGuild:GetComponent("Button").onClick:RemoveListener(self.addClickCb)
end
end
self.objGuild = nil
WwiseAudioMgr:PlaySound("ui_common_guide_hint_stop")
end
if self.objScrollView then
NovaAPI.SetComponentEnable(self.objScrollView, true)
self.objScrollView = nil
end
if self.tmpSort then
NovaAPI.SetCanvasSortingOrder(self.gameObject:GetComponent("Canvas"), self.tmpSort)
end
self._mapNode.typeMask:SetActive(false)
self._mapNode.btnHide:SetActive(false)
self._mapNode.btnTemp.gameObject:SetActive(false)
self._mapNode.btnClose.gameObject:SetActive(false)
self._mapNode.btnCount.gameObject:SetActive(false)
self._mapNode.btnJump.gameObject:SetActive(false)
self.doMsg = nil
if self.waitStep then
TimerManager.Remove(self.waitStep)
self.waitStep = nil
end
if self.isDebugStep then
return
end
self.curGuide:FinishCurrentStep()
end
function GuideCtrl:OnClickCount()
clickCount = clickCount + 1
if clickCount > maxClickCount and maxWaitTimeEnd and self._mapNode.btnJump.gameObject.activeSelf == false then
local nSort = NovaAPI.GetCanvasSortingOrder(self.gameObject:GetComponent("Canvas"))
NovaAPI.SetCanvasSortingOrder(self._mapNode.btnJump.gameObject:GetComponent("Canvas"), nSort + 16)
NovaAPI.SetCanvasSortingName(self._mapNode.btnJump.gameObject:GetComponent("Canvas"), AllEnum.SortingLayerName.UI_Top)
self._mapNode.btnJump.gameObject:SetActive(true)
end
end
function GuideCtrl:OnClickJump()
local confirmCallback = function()
self:SendGuideStep(PlayerData.Guide.runGroupId, -1)
if self.objGuild then
if self.doMsg.Type == GameEnum.guidetype.ForcedClick and self.objGuild.gameObject ~= nil then
self.GuideUIHelpCS:RemoveCanvas(self.objGuild.gameObject)
self.objGuild:GetComponent("Button").onClick:RemoveListener(self.addClickCb)
end
self.objGuild = nil
WwiseAudioMgr:PlaySound("ui_common_guide_hint_stop")
end
self.doMsg = nil
self:ClearCurGuide(true)
end
local msg = {
nType = AllEnum.MessageBox.Confirm,
sContent = ConfigTable.GetUIText("Guide_Jump_Tips"),
callbackConfirm = confirmCallback,
bBlur = false
}
EventManager.Hit(EventId.OpenMessageBox, msg)
end
function GuideCtrl:SendGuideStep(groupId, stepId)
if self.isDebugTest then
return
end
PlayerData.Guide:SetPlayerLearnReq(groupId, stepId)
end
function GuideCtrl:ClearCurGuide(isCheak)
self:QuitGamepadUI()
self._mapNode.typeMask:SetActive(false)
self._mapNode.btnHide:SetActive(false)
self._mapNode.btnClose.gameObject:SetActive(false)
self._mapNode.btnCount.gameObject:SetActive(false)
self._mapNode.btnJump.gameObject:SetActive(false)
self.curGuide:Clear()
self.curGuide = nil
self.gameObject:SetActive(false)
if self.waitStep then
TimerManager.Remove(self.waitStep)
self.waitStep = nil
end
if self.isDebugStep then
isCheak = false
end
PlayerData.Guide:FinishCurrentGroup(isCheak)
end
function GuideCtrl:NewDayClearGuide()
if PlayerData.Guide:GetGuideState() then
if self.objGuild then
if self.doMsg.Type == GameEnum.guidetype.ForcedClick then
self.GuideUIHelpCS:RemoveCanvas(self.objGuild.gameObject)
self.objGuild:GetComponent("Button").onClick:RemoveListener(self.addClickCb)
end
self.objGuild = nil
end
self.doMsg = nil
self:ClearCurGuide(false)
end
end
function GuideCtrl:OnDisable()
end
function GuideCtrl:OnDestroy()
self.doGuideData = nil
end
function GuideCtrl:QuitGamepadUI()
self._mapNode.btnShortcutClose.gameObject:SetActive(false)
if GamepadUIManager.GetInputState() then
GamepadUIManager.DisableGamepadUI("GuideCtrl")
end
end
function GuideCtrl:OnEvent_StoryDialog_DialogEnd()
if self._mapNode.blur.activeSelf == false then
return
end
self._mapNode.aniBlur:SetTrigger("tOut")
self:AddTimer(1, 0.2, function()
self._mapNode.blur:SetActive(false)
end, true, true, true)
end
function GuideCtrl:DebugEditorStep()
if self.curGuide ~= nil then
self:ClearCurGuide(false)
end
self.isDebugTest = true
if NovaAPI.GetInputFieldText(self._mapNode.InputFieldPassive) ~= "" then
local tmpMsg = NovaAPI.GetInputFieldText(self._mapNode.InputFieldPassive)
for i, v in pairs(PlayerData.Guide._guidePassiveTableData) do
if v.PassiveMsg == tmpMsg then
PlayerData.Guide.runGroupId = v.Id
PlayerData.Guide.runStepId = 0
PlayerData.Guide.isProcessing = true
self:ActiveGuidePanelEvent()
end
end
return
end
if NovaAPI.GetInputFieldText(self._mapNode.InputFieldStep) == "" then
PlayerData.Guide.runGroupId = tonumber(NovaAPI.GetInputFieldText(self._mapNode.InputFieldDebug))
PlayerData.Guide.runStepId = 0
PlayerData.Guide.isProcessing = true
self:ActiveGuidePanelEvent()
else
self.isDebugStep = true
self.curGuide = nil
local debugG = tonumber(NovaAPI.GetInputFieldText(self._mapNode.InputFieldDebug))
local debugS = tonumber(NovaAPI.GetInputFieldText(self._mapNode.InputFieldStep))
local gGroupData = ConfigTable.GetData("GuideGroup", debugG)
package.loaded["Game.UI.Guide.GuideGruop." .. gGroupData.ScriptPath] = nil
local luaClass = require("Game.UI.Guide.GuideGruop." .. gGroupData.ScriptPath)
if luaClass == nil then
return
end
self.curGuide = luaClass
self.curGuide.parent = self
self.curGuide:BindEvent()
PlayerData.Guide.isProcessing = true
local funName = "Step_" .. debugS
local func = handler(self.curGuide, self.curGuide[funName])
func()
if self.curGuide.waitAinEnd then
self:PlayTypeMask(self.curGuide.msg)
end
end
end
function GuideCtrl:DebugEditorClear()
if self.curGuide ~= nil then
self:ClearCurGuide(false)
end
end
function GuideCtrl:UserEventUpload(strEventName, parme1, parme2)
end
return GuideCtrl
@@ -0,0 +1,216 @@
local GuideGroup_10 = class("GuideGroup_10")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Positioning_Char_Grid = "OnEvent_PositioningCharGrid",
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 10
local totalStep = 5
local current = 1
function GuideGroup_10:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_10: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_10: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_10:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_10:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_10:Step_1()
current = 1
self.parent:ActiveHide(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
local tbOption = {
AllEnum.ChooseOption.Char_Element,
AllEnum.ChooseOption.Char_Rarity,
AllEnum.ChooseOption.Char_PowerStyle,
AllEnum.ChooseOption.Char_AffiliatedForces,
AllEnum.ChooseOption.Char_TacticalStyle
}
PlayerData.Filter:Reset(tbOption)
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.1))
EventManager.Hit(EventId.FilterConfirm)
self:Step_2()
end
cs_coroutine.start(wait)
end
function GuideGroup_10:Step_2()
self.msg = {
BindIcon = "CharacterListPanel/----SafeAreaRoot----/goList/sv/Viewport/Content/0/btnGrid",
Deviation = {0, 0},
Desc = "Guide_10_1",
DescDeviation = {300, -400},
HandDeviation = {0, -260},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
self.charId = 112
current = 2
EventManager.Hit("Guide_PositionCharPos", self.charId)
end
function GuideGroup_10:Step_3()
self.msg = {
BindIcon = "CharacterInfoPanel/----SafeAreaRoot----/---Right---/btnDevelopment",
Deviation = {0, 2},
Desc = "Guide_10_2",
DescDeviation = {-730, 0},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.openPanelId = PanelId.CharBgPanel
self.waitAnimTime = 0.24
end
function GuideGroup_10:Step_4()
current = 4
self.nEntryId = 100201
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, self.nEntryId)
end
function GuideGroup_10:Step_5()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Upgrade---/NotMax/rtMat",
Size = {800, 440},
Deviation = {0, -56},
Desc = "Guide_10_3",
DescDeviation = {-1000, -140},
Type = GameEnum.guidetype.Introductory,
isShowHand = true,
HandDeviation = {-450, 0},
HandRotation = -90
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_10:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_10:OnEvent_PositioningCharGrid(charId, gridName)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
if current == 2 then
self.msg.BindIcon = "CharacterListPanel/----SafeAreaRoot----/goList/sv/Viewport/Content/" .. gridName .. "/btnGrid"
local tmpIndex = (gridName + 1) % 6
if tmpIndex == 5 then
self.msg.DescDeviation = {
0,
self.msg.DescDeviation[2]
}
elseif tmpIndex == 0 then
self.msg.DescDeviation = {
-300,
self.msg.DescDeviation[2]
}
end
local charCount = PlayerData.Char:GetAllCharCount()
if 6 < charCount then
local totalLine = math.ceil(charCount / 6)
local curLine = math.ceil((gridName + 1) / 6)
if totalLine == curLine then
self.msg.DescDeviation = {
self.msg.DescDeviation[1],
-self.msg.DescDeviation[2]
}
self.msg.HandDeviation = {0, 260}
self.msg.HandRotation = 180
end
end
self.parent:PlayTypeMask(self.msg)
end
end
cs_coroutine.start(wait)
end
function GuideGroup_10:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.DictionaryEntry and current == 4 then
self:Step_5()
end
end
function GuideGroup_10:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"1"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 5 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"1"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
elseif current < totalStep then
self:SendGuideStep(current)
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_10
@@ -0,0 +1,106 @@
local GuideGroup_101 = class("GuideGroup_101")
local mapEventConfig = {
StoryDialog_DialogEnd = "OnEvent_StoryDialog_DialogEnd",
Guide_Potential_SelectComplete = "OnEvent_Potential_SelectComplete"
}
local groupId = 101
local totalStep = 2
local current = 1
function GuideGroup_101:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 2
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_101: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_101: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_101:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_101:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_101:Step_1()
local avgId = "BTm00_06"
current = 1
self.parent:PlayAvg(avgId)
end
function GuideGroup_101:Step_2()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/rtPotentials",
Size = {1760, 880},
Deviation = {0, 20},
Desc = "Guide_101_2",
DescDeviation = {-530, 440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_101:OnEvent_StoryDialog_DialogEnd()
if current == 1 then
self:SendGuideStep(current)
self:Step_2()
end
end
function GuideGroup_101:OnEvent_Potential_SelectComplete()
if current == 2 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_101:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"20"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < 2 then
self:SendGuideStep(current)
else
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()
end
return GuideGroup_101
@@ -0,0 +1,98 @@
local GuideGroup_102 = class("GuideGroup_102")
local mapEventConfig = {}
local groupId = 102
local totalStep = 2
local current = 1
function GuideGroup_102:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_102: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_102: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_102:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_102:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_102:Step_1()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/rtPotentials",
Size = {1760, 880},
Deviation = {0, 20},
Desc = "Guide_102_2",
DescDeviation = {-530, 440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_102:Step_2()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/---Title---/goChangeDesc",
Size = {330, 80},
Deviation = {0, 0},
Desc = "Guide_102_3",
DescDeviation = {-687, -111},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_102:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"19"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
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()
end
return GuideGroup_102
@@ -0,0 +1,97 @@
local GuideGroup_103 = class("GuideGroup_103")
local mapEventConfig = {
StoryDialog_DialogEnd = "OnEvent_StoryDialog_DialogEnd",
Guide_FateCard_SelectComplete = "OnEvent_FateCard_SelectComplete"
}
local groupId = 103
local totalStep = 2
local current = 1
function GuideGroup_103:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_103: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_103: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_103:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_103:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_103:Step_1()
self.msg = {
BindIcon = "FateCardSelectPanel/----SafeAreaRoot----/rtFateCards",
Size = {1700, 800},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_3_8",
DescDeviation = {-930, 300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_103:Step_2()
self.msg = {
BindIcon = "StarTowerRoomInfo/----SafeAreaRoot----/FateCard/goFateCardList",
Size = {300, 200},
Deviation = {-100, 40},
Head = "Icon/Head/head_11101",
Desc = "Guide_3_8",
DescDeviation = {-930, 300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(false)
current = 2
end
function GuideGroup_103:OnEvent_FateCard_SelectComplete()
if current == 2 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_103:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current < 1 then
self:SendGuideStep(current)
else
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()
end
return GuideGroup_103
@@ -0,0 +1,157 @@
local GuideGroup_104 = class("GuideGroup_104")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Show_MainView_UI = "ShowMainViewUI",
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 104
local totalStep = 5
local current = 1
function GuideGroup_104:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_104: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_104: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_104:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_104:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_104:Step_1()
self.msg = {
BindIcon = "CharFgPanel/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnHome",
Deviation = {0, 0},
Desc = "Guide_104_1",
DescDeviation = {540, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(false)
current = 1
end
function GuideGroup_104:Step_2()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomLeft--/trBoardBtnList/btnSwitchActor2D",
Size = {90, 110},
Deviation = {0, 0},
DescDeviation = {650, 60},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(false)
current = 2
end
function GuideGroup_104:Step_3()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Right---/goNotEmpty/sv",
Deviation = {0, 0},
Desc = "Guide_104_2",
DescDeviation = {-850, 340},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.openPanelId = PanelId.ChooseHomePageRolePanel
self.waitAnimTime = 0.24
end
function GuideGroup_104:Step_4()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Left---/btnChange",
Deviation = {100, 0},
Desc = "Guide_104_3",
DescDeviation = {760, 40},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_104:Step_5()
EventManager.Hit("Guide_ChangeCharShowOrder")
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Left---/imgListBg",
Deviation = {0, 0},
Desc = "Guide_104_4",
DescDeviation = {420, 260},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.5
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_104:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.ReceivePropsTips and current == 1 then
self.parent:ActiveHide(true)
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_104:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
EventManager.Hit("Guide_ChangeCharBoardPage", AllEnum.HandBookTab.Skin)
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_104:ShowMainViewUI()
if current == 2 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_104:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current == 3 and PlayerData.Board:CheckSelectBoardChar() == false then
self:Step_5()
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_104
@@ -0,0 +1,76 @@
local GuideGroup_105 = class("GuideGroup_105")
local TimerManager = require("GameCore.Timer.TimerManager")
local mapEventConfig = {}
local groupId = 105
local totalStep = 1
local current = 1
function GuideGroup_105:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_105: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_105: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_105:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_105:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_105:Step_1()
self.msg = {
BindIcon = "AdventureMainUI/RootPanel/AutoBattlePanel/btnAutoBattleOpen",
Size = {160, 140},
Deviation = {0, 0},
Desc = "Guide_105_1",
DescDeviation = {-630, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
TimerManager.Add(1, 2, self, function()
CS.AdventureModuleHelper.PauseLogic()
self.parent:PlayTypeMask(self.msg)
end, true, false, false)
end
function GuideGroup_105:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
CS.AdventureModuleHelper.ResumeLogic()
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_105
@@ -0,0 +1,93 @@
local GuideGroup_106 = class("GuideGroup_106")
local mapEventConfig = {}
local groupId = 106
local totalStep = 2
local current = 1
function GuideGroup_106:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_106: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_106: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_106:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_106:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_106:Step_1()
self.msg = {
BindIcon = "StarTowerMenu/----SafeAreaRoot----/imgCoinBg",
Size = {200, 60},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_106_1",
DescDeviation = {-630, -100},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
CS.AdventureModuleHelper.PauseLogic()
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_106:Step_2()
self.msg = {
BindIcon = "StarTowerMenu/----SafeAreaRoot----/imgCoinBg",
Size = {0, 0},
Deviation = {400, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_106_2",
DescDeviation = {-900, -450},
Type = GameEnum.guidetype.Introductory,
isNoMiddle = true
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_106:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == totalStep then
CS.AdventureModuleHelper.ResumeLogic()
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_106
@@ -0,0 +1,162 @@
local GuideGroup_11 = class("GuideGroup_11")
local mapEventConfig = {
Positioning_StarTower_Grid = "OnEvent_PositioningStarTowerGrid",
Guide_InitStarTowerFinish = "OnEvent_Guide_InitStarTowerFinish",
Guide_StarTowerPlayIn = "Guide_InitStarTowerFinish",
Guide_LevelMenuOpen = "OnEvent_GuideLevelMenuOpen"
}
local groupId = 11
local totalStep = 4
local current = 1
function GuideGroup_11:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_11: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_11: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_11:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_11:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_11:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap",
CloseObj = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap/anti_scale",
Size = {330, 200},
Deviation = {10, -8},
Head = "Icon/Head/head_11101",
Desc = "Guide_11_1",
DescDeviation = {-750, 60},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_11:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/bgLeft/btnStarTower",
Size = {420, 680},
Deviation = {0, -2},
Head = "Icon/Head/head_11101",
Desc = "Guide_11_2",
DescDeviation = {-750, -250},
HandDeviation = {-300, 22},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.LevelMenu
self.waitAnimTime = 0.5
end
function GuideGroup_11:Step_3()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---StarTower---/svStarTower/Viewport/Content/0/btnGrid",
Size = {1030, 220},
Deviation = {0, 6},
Head = "Icon/Head/head_11101",
Desc = "Guide_11_3",
DescDeviation = {1000, -228},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
self.nStarTowerGroupId = 2
current = 3
end
function GuideGroup_11:Step_4()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/SecondMenu/StarTower/btnStarTowerGoto",
Size = {420, 150},
Deviation = {0, 0},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.2
end
function GuideGroup_11:OnEvent_PositioningStarTowerGrid(nGroupId, gridName)
if current == 3 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
self.msg.BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---StarTower---/svStarTower/Viewport/Content/" .. gridName .. "/btnGrid"
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_11:OnEvent_Guide_InitStarTowerFinish()
if current == 3 and self.nStarTowerGroupId ~= nil then
EventManager.Hit("Guide_PositionStarTowerPos", self.nStarTowerGroupId)
end
end
function GuideGroup_11:OnEvent_GuideLevelMenuOpen()
if current == 2 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_11:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
elseif current < totalStep then
self:SendGuideStep(current)
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_11
@@ -0,0 +1,204 @@
local GuideGroup_12 = class("GuideGroup_12")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Guide_OpenStarTowerLevelGroup = "OnEvent_OpenStarTowerLevelGroup"
}
local groupId = 12
local totalStep = 6
local current = 1
function GuideGroup_12:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_12: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_12: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_12:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_12:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_12:Step_1()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/rt_StarTowerInfo/rt_Toggle",
Size = {530, 870},
Deviation = {-40, 0},
Desc = "Guide_12_1",
DescDeviation = {900, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.2
end
function GuideGroup_12:Step_2()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/rt_StarTowerInfo/rt_Info/TMPStarTowerName",
Size = {800, 300},
Deviation = {370, -102},
Desc = "Guide_12_2",
DescDeviation = {112, -576},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.2
end
function GuideGroup_12:Step_3()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/rt_StarTowerInfo/rt_Info/btnGo",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
Desc = "Guide_12_3",
DescDeviation = {-800, 20},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.32
end
function GuideGroup_12:Step_4()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/----Char----/goChar1/btnSelect",
Size = {600, 280},
Deviation = {0, -140},
Head = "Icon/Head/head_11101",
Desc = "Guide_12_4",
DescDeviation = {-77, -362},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.openPanelId = PanelId.MainlineFormation
self.waitAnimTime = 0.2
end
function GuideGroup_12:Step_5()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/btnFastFormation",
Deviation = {0, 0},
Desc = "Guide_12_5",
DescDeviation = {-800, 200},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.2
end
function GuideGroup_12:Step_6()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/btnStartBattle",
Deviation = {0, 2},
Head = "Icon/Head/head_11101",
HandDeviation = {0, 120},
Desc = "Guide_12_6",
DescDeviation = {-800, 200},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_12:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_12:OnEvent_OpenStarTowerLevelGroup(nGroup)
if nGroup ~= 2 then
self.parent:ClearCurGuide(false)
return
end
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_12:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
self.nStarTowerGroupId = 0
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"2"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 7 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"2"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
elseif current < totalStep then
self:SendGuideStep(current)
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_12
@@ -0,0 +1,78 @@
local GuideGroup_13 = class("GuideGroup_13")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 13
local totalStep = 1
local current = 1
function GuideGroup_13:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_13: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_13: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_13:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_13:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_13:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnTask",
Size = {120, 120},
Deviation = {0, 0},
Head = "Icon/Head/head_999901",
Desc = "Guide_13_1",
DescDeviation = {-500, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_13:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_13
@@ -0,0 +1,132 @@
local GuideGroup_14 = class("GuideGroup_14")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 14
local totalStep = 2
local current = 1
function GuideGroup_14:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_14: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_14: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_14:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_14:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_14:Step_1()
EventManager.Hit("Guide_SelectQuestPage", AllEnum.QuestPanelTab.DailyQuest)
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtDailyQuest/goQuestList",
Deviation = {0, 0},
Desc = "Guide_14_1",
DescDeviation = {-930, -420},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_14:Step_2()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtDailyQuest/imgTitleBg",
Size = {1050, 160},
Deviation = {0, 0},
Desc = "Guide_14_2",
DescDeviation = {-500, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.2
end
function GuideGroup_14:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"3"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 3 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"3"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_14
@@ -0,0 +1,124 @@
local GuideGroup_15 = class("GuideGroup_15")
local mapEventConfig = {}
local groupId = 15
local totalStep = 3
local current = 1
function GuideGroup_15:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_15: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_15: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_15:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_15:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_15:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/btnResource",
Size = {450, 360},
Deviation = {0, 170},
Head = "Icon/Head/head_11101",
Desc = "Guide_15_1",
DescDeviation = {-800, -40},
HandDeviation = {-300, 160},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_15:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---Resource---/svResource/Viewport/Content/btnRegion",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_15_2",
DescDeviation = {580, -250},
HandDeviation = {0, 230},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.5
end
function GuideGroup_15:Step_3()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/SecondMenu/Resource/btnResourceGoto",
Size = {870, 410},
Deviation = {0, 140},
Head = "Icon/Head/head_11101",
HandDeviation = {0, 450},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_15:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_15
@@ -0,0 +1,171 @@
local GuideGroup_16 = class("GuideGroup_16")
local mapEventConfig = {
[EventId.ClosePanel] = "OnEvent_ClosePanel",
RogueBossGuideFinish = "OnEvent_RogueBossGuideFinish",
Guide_OpenRogueBossInfo = "OnEvent_Guide_OpenRogueBossInfo"
}
local groupId = 16
local totalStep = 3
local current = 1
local isCloseAuto = false
function GuideGroup_16:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_16: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_16: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_16:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_16:Clear()
isCloseAuto = false
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_16:Step_1()
self.msg = {
BindIcon = "RogueBossSelect/----SafeAreaRoot----/rtBossList/svList",
Size = {1500, 750},
Deviation = {0, 10},
Head = "Icon/Head/head_11101",
Desc = "Guide_16_1",
DescDeviation = {0, -400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.6
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
if isCloseAuto then
self.parent:ClearCurGuide(false)
return
end
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_16:Step_2()
self.msg = {
BindIcon = "RogueBossSelect/----SafeAreaRoot----/rtBossList/svList/Viewport/ContentTemp/gridTemp2/AnimRoot/btnGrid",
Deviation = {0, 0},
HandRotation = -180,
HandDeviation = {0, 420},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_16:Step_3()
self.msg = {
BindIcon = "RogueBossSelect/----SafeAreaRoot----/rtBossInfo/rtBoss/titleReward",
Size = {520, 240},
Deviation = {4, -70},
Head = "Icon/Head/head_11101",
Desc = "Guide_16_3",
DescDeviation = {-220, -280},
Type = GameEnum.guidetype.Introductory
}
current = 3
self.waitAnimTime = 0.5
end
function GuideGroup_16:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.RogueBossLevel and current == 1 then
self.parent:ClearCurGuide(true)
end
end
function GuideGroup_16:OnEvent_Guide_OpenRogueBossInfo()
if current == 2 then
self:Step_3()
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
end
function GuideGroup_16:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"4"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"4"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 2 then
self:SendGuideStep(-1)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current ~= 2 then
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_16:OnEvent_RogueBossGuideFinish()
isCloseAuto = true
end
return GuideGroup_16
@@ -0,0 +1,83 @@
local GuideGroup_17 = class("GuideGroup_17")
local mapEventConfig = {}
local groupId = 17
local totalStep = 1
local current = 1
function GuideGroup_17:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_17: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_17: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_17:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_17:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_17:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/rtFunctionBg/btnInfinity",
Size = {200, 200},
Deviation = {0, 0},
Head = "Icon/Head/head_917402",
Desc = "Guide_17_1",
DescDeviation = {-700, -200},
HandDeviation = {-180, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_17:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
end
return GuideGroup_17
@@ -0,0 +1,165 @@
local GuideGroup_18 = class("GuideGroup_18")
local mapEventConfig = {
InfinityTowerPanelOpenFinish = "OnEvent_InfinityTowerPanelOpenFinish",
[EventId.TransAnimOutClear] = "OnEvent_TransAnimOutClear"
}
local groupId = 18
local totalStep = 4
local current = 1
function GuideGroup_18:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_18: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_18: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_18:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_18:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
EventManager.Hit("Guide_DisableScrollView", false)
end
function GuideGroup_18:Step_1()
current = 1
self.parent:ActiveHide(true)
end
function GuideGroup_18:Step_2()
self.msg = {
BindIcon = "InfinityTowerSelectT/----SafeAreaRoot----/towerList/item_1",
Size = {820, 200},
Deviation = {0, 5},
Head = "Icon/Head/head_917302",
Desc = "Guide_18_1",
DescDeviation = {-100, -320},
HandDeviation = {0, -180},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.5
end
function GuideGroup_18:Step_3()
self.msg = {
BindIcon = "InfinityTowerSelectT/----SafeAreaRoot----/diffListView/goContent/diffList/Viewport/Content/0/AnimRoot/diff_btn",
Size = {900, 200},
Deviation = {-4, 0},
Head = "Icon/Head/head_917402",
Desc = "Guide_18_2",
DescDeviation = {-500, -350},
HandDeviation = {0, -200},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 1
end
function GuideGroup_18:Step_4()
current = 4
self.nEntryId = 201201
end
function GuideGroup_18:OnEvent_InfinityTowerPanelOpenFinish(nPageType)
if current == 1 then
if nPageType ~= 1 then
self.parent:ClearCurGuide(false)
return
end
self:Step_2()
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
end
function GuideGroup_18:OnEvent_TransAnimOutClear()
if current == 4 and self.nEntryId ~= nil then
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, self.nEntryId)
self:FinishCurrentStep()
end
end
function GuideGroup_18:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"5"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 3 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"5"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 3 then
EventManager.Hit("Guide_DisableScrollView", false)
end
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
if current == 3 then
EventManager.Hit("Guide_DisableScrollView", true)
end
end
cs_coroutine.start(wait)
end
end
return GuideGroup_18
@@ -0,0 +1,150 @@
local GuideGroup_19 = class("GuideGroup_19")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 19
local totalStep = 4
local current = 1
function GuideGroup_19:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_19: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_19: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_19:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_19:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_19:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/btnResource",
Size = {450, 360},
Deviation = {0, 170},
Head = "Icon/Head/head_11101",
Desc = "Guide_19_1",
DescDeviation = {-800, -40},
HandDeviation = {-300, 160},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_19:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---Resource---/svResource/Viewport/Content/btnEquipment",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_19_2",
DescDeviation = {760, -360},
HandDeviation = {0, 200},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.4
end
function GuideGroup_19:Step_3()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/SecondMenu/Resource/btnResourceGoto",
Size = {870, 410},
Deviation = {0, 140},
Head = "Icon/Head/head_11101",
HandDeviation = {0, 450},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_19:Step_4()
self.msg = {
BindIcon = "SkillInstanceLevelSelect/----SafeAreaRoot----/rt_SkillInstanceSelect/---LevelList---",
Size = {1500, 750},
Deviation = {-501, 13},
Head = "Icon/Head/head_11101",
Desc = "Guide_19_4",
DescDeviation = {-500, -400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
self.openPanelId = 121
current = 4
self.waitAnimTime = 0.3
end
function GuideGroup_19:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_19:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_19
@@ -0,0 +1,164 @@
local GuideGroup_2 = class("GuideGroup_2")
local mapEventConfig = {
Guide_GachaFinish = "OnEvent_Guide_GachaFinish",
Guide_GachaOpen = "OnEvent_Guide_GachaOpen",
[EventId.ClosePanel] = "OnEvent_ClosePanel",
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 2
local totalStep = 4
local current = 1
local itemId = 503
function GuideGroup_2:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_2: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_2: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_2:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_2:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_2:Step_1()
current = 1
self.parent:ActiveHide(true)
local callback = function()
self.openPanelId = PanelId.GachaSpin
local func = function()
EventManager.Hit(EventId.OpenPanel, PanelId.GachaSpin, 5)
end
EventManager.Hit(EventId.SetTransition, 6, func, AllEnum.MainViewCorner.Recruit)
end
PlayerData.Base:CheckFunctionBtn(GameEnum.OpenFuncType.Gacha, callback)
end
function GuideGroup_2:Step_2()
current = 2
self.msg = {
BindIcon = "GachaPanel/----SafeAreaRoot----/btn_NewBieJump",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_2_1",
DescDeviation = {-800, 40},
HandDeviation = {0, 200},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
self.waitAnimTime = 0.8
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_2:Step_3()
EventManager.Hit("Guide_GachaStart", false)
self.msg = {
BindIcon = "GachaPanel/----GachaNewbie----/GachaNewBieShowResult/----SafeareaRoot----/right_down/btn_newbie_save",
Deviation = {0, 0},
Desc = "Guide_2_2",
DescDeviation = {-730, 50},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.8
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_2:Step_4()
self.msg = {
BindIcon = "GachaPanel/----GachaNewbie----/GachaNewBieShowResult/----SafeareaRoot----/left_down/btn_newbie_record",
Deviation = {0, 0},
Desc = "Guide_2_3",
DescDeviation = {800, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_2:OnEvent_Guide_GachaOpen()
if current == 1 then
self:Step_2()
end
end
function GuideGroup_2:OnEvent_Guide_GachaFinish()
if current == 2 then
self:Step_3()
end
end
function GuideGroup_2:OnEvent_ClosePanel(nPanelId)
end
function GuideGroup_2:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
self:SendGuideStep(-1)
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
NovaAPI.UserEventUpload("first_gacha10", tab)
local tab_1 = {}
table.insert(tab_1, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab_1, {
"newbie_tutorial_id",
"14"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab_1)
EventManager.Hit("Guide_GachaStart", true)
elseif current == 3 then
self:Step_4()
elseif current == 4 then
self.parent:ClearCurGuide(true)
end
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_2
@@ -0,0 +1,141 @@
local GuideGroup_20 = class("GuideGroup_20")
local mapEventConfig = {}
local groupId = 20
local totalStep = 3
local current = 1
function GuideGroup_20:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_20: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_20: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_20:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_20:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_20:Step_1()
self.msg = {
BindIcon = "SkillInstanceLevelSelect/----SafeAreaRoot----/rt_SkillInstanceInfo/rtToggles/viewPort/rt_Toggle",
Size = {510, 770},
Deviation = {-10, -370},
Head = "Icon/Head/head_11101",
Desc = "Guide_20_1",
DescDeviation = {900, -790},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.3
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_20:Step_2()
self.msg = {
BindIcon = "SkillInstanceLevelSelect/----SafeAreaRoot----/rt_SkillInstanceInfo/right/imgReward",
Size = {650, 250},
Deviation = {0, -80},
Head = "Icon/Head/head_11101",
Desc = "Guide_20_2",
DescDeviation = {-500, -320},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_20:Step_3()
self.msg = {
BindIcon = "SkillInstanceLevelSelect/----SafeAreaRoot----/rt_SkillInstanceInfo/right/titleReward",
Size = {520, 240},
Deviation = {4, -70},
Head = "Icon/Head/head_11101",
Desc = "Guide_20_3",
DescDeviation = {-220, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_20:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"6"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"6"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
elseif 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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_20
@@ -0,0 +1,106 @@
local GuideGroup_201 = class("GuideGroup_201")
local mapEventConfig = {
StoryDialog_DialogEnd = "OnEvent_StoryDialog_DialogEnd",
Guide_Potential_SelectComplete = "OnEvent_Potential_SelectComplete"
}
local groupId = 201
local totalStep = 2
local current = 1
function GuideGroup_201:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 2
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_201: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_201: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_201:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_201:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_201:Step_1()
local avgId = "BTm00_06"
current = 1
self.parent:PlayAvg(avgId)
end
function GuideGroup_201:Step_2()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/rtPotentials",
Size = {1760, 880},
Deviation = {0, 20},
Desc = "Guide_201_1",
DescDeviation = {-530, 440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_201:OnEvent_StoryDialog_DialogEnd()
if current == 1 then
self:SendGuideStep(current)
self:Step_2()
end
end
function GuideGroup_201:OnEvent_Potential_SelectComplete()
if current == 2 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_201:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"22"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < 2 then
self:SendGuideStep(current)
else
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()
end
return GuideGroup_201
@@ -0,0 +1,98 @@
local GuideGroup_202 = class("GuideGroup_202")
local mapEventConfig = {}
local groupId = 202
local totalStep = 1
local current = 1
function GuideGroup_202:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_202: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_202: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_202:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_202:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_202:Step_1()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/rtPotentials",
Size = {1760, 880},
Deviation = {0, 20},
Desc = "Guide_202_1",
DescDeviation = {-530, 440},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_202:Step_2()
self.msg = {
BindIcon = "PotentialSelectPanel/----SafeAreaRoot----/---Title---/goChangeDesc",
Size = {330, 80},
Deviation = {0, 0},
Desc = "Guide_202_1",
DescDeviation = {-687, -111},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_202:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"23"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
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()
end
return GuideGroup_202
@@ -0,0 +1,164 @@
local GuideGroup_21 = class("GuideGroup_21")
local mapEventConfig = {}
local groupId = 21
local totalStep = 3
local current = 1
function GuideGroup_21:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_21: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_21: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_21:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_21:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_21:Step_1()
local LocalData = require("GameCore.Data.LocalData")
local nIdx = LocalData.GetPlayerLocalData("SavedTeamIdx")
if nIdx == nil then
nIdx = 1
end
local tmpDisc = PlayerData.Team:GetTeamDiscData(nIdx)
local haveDis = false
for i, v in pairs(tmpDisc) do
if v ~= 0 then
haveDis = true
break
end
end
if haveDis then
local _, tbTeamMemberId = PlayerData.Team:GetTeamData(nIdx)
local Callback = function()
EventManager.Hit("Guide_RefreshDiscFormation")
end
PlayerData.Team:UpdateFormationInfo(1, tbTeamMemberId, {
0,
0,
0,
0,
0,
0
}, Callback)
end
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/rtSelect/rtCur",
Size = {2100, 690},
Deviation = {0, 26},
Head = "Icon/Head/head_11101",
Desc = "Guide_21_1",
DescDeviation = {0, -425},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_21:Step_2()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/bottomBtnList/btnFastFormation",
Size = {320, 110},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_21:Step_3()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/bottomBtnList/btnStartBattle",
Size = {330, 110},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_21_3",
DescDeviation = {-800, 20},
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_21:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"17"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
elseif current == 3 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"18"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_21
@@ -0,0 +1,295 @@
local GuideGroup_22 = class("GuideGroup_22")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Guide_SendTowerGrowthSuccess = "OnEvent_SendTowerGrowthSuccess",
Guide_SendTowerGrowthSelectGroupId = "OnEvent_SendTowerGrowthSelectGroupId",
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 22
local totalStep = 8
local current = 1
function GuideGroup_22:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_22: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_22: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_22:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_22:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_22:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---StarTower---/btnTask",
Size = {150, 150},
Deviation = {0, -14},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_1",
DescDeviation = {880, 0},
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.7
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_22:Step_2()
self.msg = {
BindIcon = "StarTowerQuestPanel/----SafeAreaRoot----/svQuest/Viewport/Content",
Size = {940, 600},
Deviation = {470, -290},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_2",
DescDeviation = {470, -710},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.4
self.openPanelId = PanelId.StarTowerQuest
end
function GuideGroup_22:Step_3()
self.msg = {
BindIcon = "StarTowerQuestPanel/----SafeAreaRoot----/btnReceiveAll",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_3",
DescDeviation = {-700, 150},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_22:Step_4()
self.msg = {
BindIcon = "StarTowerQuestPanel/----SafeAreaRoot----/btnGrowth",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_4",
DescDeviation = {-700, 150},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_22:Step_5()
self.msg = {
BindIcon = "StarTowerGrowthPanel/----SafeAreaRoot----/svNode/Viewport/NodeContent/NormalNodeList(Clone)",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_5",
DescDeviation = {750, -210},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.4
self.openPanelId = PanelId.StarTowerGrowth
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
local tempRoot = GameObject.Find("---- UI ----").transform
local svNode = tempRoot:Find("StarTowerGrowthPanel/----SafeAreaRoot----/svNode"):GetComponent("ScrollRect")
NovaAPI.SetHorizontalNormalizedPosition(svNode, 0)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_22:Step_6()
self.msg = {
BindIcon = "StarTowerGrowthPanel/----SafeAreaRoot----/btnActiveAll",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_6",
DescDeviation = {-700, 150},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_22:Step_7()
self.msg = {
BindIcon = "StarTowerGrowthPanel/----SafeAreaRoot----/btnQuest",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_7",
DescDeviation = {-700, 150},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 7
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_22:Step_8()
self.msg = {
BindIcon = "StarTowerQuestPanel/----SafeAreaRoot----/Cube",
Size = {700, 780},
Deviation = {0, -140},
Head = "Icon/Head/head_11101",
Desc = "Guide_22_8",
DescDeviation = {900, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 8
self.waitAnimTime = 0.4
self.openPanelId = PanelId.StarTowerQuest
end
function GuideGroup_22:OnEvent_PanelOnEnableById(nPanelId)
if self.openPanelId and self.openPanelId == nPanelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
if current == 2 then
EventManager.Hit("GuideSelectNote", 1, 3)
end
end
cs_coroutine.start(wait)
end
end
function GuideGroup_22:OnEvent_SendTowerGrowthSuccess()
if current == 6 then
self:Step_7()
end
end
function GuideGroup_22:OnEvent_SendTowerGrowthSelectGroupId(nId)
self.SelectGroupId = nId
end
function GuideGroup_22:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.ReceivePropsTips and current == 3 then
self:Step_4()
end
end
function GuideGroup_22:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"7"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"7"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
elseif current == 2 then
local tbCore, tbNormal = PlayerData.Quest:GetStarTowerQuestData()
local bClear = true
for _, v in pairs(tbNormal) do
if v.nStatus == 1 then
bClear = false
break
end
end
for _, v in pairs(tbCore) do
if v.nStatus == 1 then
bClear = false
break
end
end
if not bClear then
self:Step_3()
else
self:Step_4()
end
return
elseif current == 3 then
return
elseif current == 5 then
local bAble, sTip = PlayerData.StarTower:CheckGroupReady(self.SelectGroupId)
if bAble then
self:Step_6()
else
self:Step_7()
end
return
elseif current == 6 then
return
elseif 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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_22
@@ -0,0 +1,103 @@
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
@@ -0,0 +1,183 @@
local GuideGroup_23 = class("GuideGroup_23")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 23
local totalStep = 5
local current = 1
function GuideGroup_23:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_23: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_23: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_23:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_23:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_23:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnMenu",
Size = {100, 110},
Deviation = {5, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_23_1",
DescDeviation = {-750, -260},
HandDeviation = {-150, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_23:Step_2()
self.msg = {
BindIcon = "MainViewSidePanel/----SafeAreaRoot----/ButtonList1/2/btnCraft",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
HandDeviation = {-300, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.2
self.openPanelId = PanelId.MainViewSide
end
function GuideGroup_23:Step_3()
self.msg = {
BindIcon = "CraftingPanel/----SafeAreaRoot----/---MatProduction---/goProductionList",
Deviation = {-8, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_23_3",
DescDeviation = {760, -360},
HandDeviation = {400, 0},
HandRotation = 90,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.5
self.openPanelId = PanelId.Crafting
end
function GuideGroup_23:Step_4()
self.msg = {
BindIcon = "CraftingPanel/----SafeAreaRoot----/---MatProduction---/goCraftingContent/btnCraftingItem",
Size = {600, 550},
Deviation = {6, 10},
Head = "Icon/Head/head_11101",
Desc = "Guide_23_4",
DescDeviation = {-740, -500},
HandDeviation = {-400, 0},
HandRotation = -90,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.1
end
function GuideGroup_23:Step_5()
self.msg = {
BindIcon = "CraftingPanel/----SafeAreaRoot----/---MatProduction---/goCraftingContent/goMaterialList",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_23_5",
DescDeviation = {-800, 250},
HandDeviation = {-450, 0},
HandRotation = -90,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.1
end
function GuideGroup_23:OnEvent_PanelOnEnableById(nPanelId)
if self.openPanelId and self.openPanelId == nPanelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_23:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"10"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"10"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_23
@@ -0,0 +1,85 @@
local GuideGroup_232 = class("GuideGroup_232")
local TimerManager = require("GameCore.Timer.TimerManager")
local TimerScaleType = require("GameCore.Timer.TimerScaleType")
local mapEventConfig = {
Guide_StarTowerDepotDisc = "OnEvent_StarTowerDepotDisc"
}
local groupId = 232
local totalStep = 1
local current = 1
function GuideGroup_232:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_232: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_232: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_232:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_232:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_232:Step_1()
self.msg = {
BindIcon = "DiscSkillActivePanel/----SafeAreaRoot----/goSkillCard",
Deviation = {0, 0},
Desc = "Guide_232_1",
DescDeviation = {-460, -370},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.3
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_232:OnEvent_StarTowerDepotDisc(bHasSkill)
self.bHasSkill = bHasSkill
end
function GuideGroup_232: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
end
return GuideGroup_232
@@ -0,0 +1,187 @@
local GuideGroup_24 = class("GuideGroup_24")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 24
local totalStep = 5
local current = 1
function GuideGroup_24:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_24: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_24: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_24:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_24:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_24:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnDispatch",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_24_1",
DescDeviation = {-600, -250},
HandDeviation = {-150, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_24:Step_2()
self.msg = {
BindIcon = "DispatchPanel/----SafeAreaRoot----/goDispatchInfo/goRequireInfo/imgBg",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_24_2",
DescDeviation = {-600, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.6
self.openPanelId = PanelId.DispatchPanel
end
function GuideGroup_24:Step_3()
self.msg = {
BindIcon = "DispatchPanel/----SafeAreaRoot----/goDispatchInfo/goRequireInfo/goRequireList",
Size = {720, 300},
Deviation = {330, -35},
Head = "Icon/Head/head_11101",
Desc = "Guide_24_3",
DescDeviation = {-260, -350},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_24:Step_4()
self.msg = {
BindIcon = "DispatchPanel/----SafeAreaRoot----/goDispatchInfo/goBtnRoot/btnOneClick",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_24_4",
DescDeviation = {-550, -160},
HandDeviation = {-400, 0},
HandRotation = -90,
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.1
end
function GuideGroup_24:Step_5()
self.msg = {
BindIcon = "DispatchPanel/----SafeAreaRoot----/goDispatchInfo/goRequireInfo/goDispatchTimeGroup",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_24_5",
DescDeviation = {-660, -240},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.1
end
function GuideGroup_24:OnEvent_PanelOnEnableById(nPanelId)
if self.openPanelId and self.openPanelId == nPanelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_24:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"8"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 4 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"8"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current == 3 then
local tempRoot = GameObject.Find("---- UI ----").transform
local tmpBtnOneClick = tempRoot:Find("DispatchPanel/----SafeAreaRoot----/goDispatchInfo/goBtnRoot/btnOneClick").gameObject
if tmpBtnOneClick.activeSelf == false then
self.parent:ClearCurGuide(true)
return
end
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_24
@@ -0,0 +1,178 @@
local GuideGroup_25 = class("GuideGroup_25")
local mapEventConfig = {
Guide_SelectDisc = "OnEvent_SelectDisc"
}
local groupId = 25
local totalStep = 4
local current = 1
local subSkillCount = 1
function GuideGroup_25:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_25: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_25: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_25:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_25:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_25:Step_1()
self.msg = {
BindIcon = "DiscPanel/----SafeAreaRoot----/---Info---/--Left--/goNameInfo",
Size = {500, 400},
Deviation = {-8, -130},
Head = "Icon/Head/head_11101",
Desc = "Guide_25_1",
DescDeviation = {850, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_25:Step_2()
self.msg = {
BindIcon = "DiscPanel/----SafeAreaRoot----/---Info---/--Right--/DiscSkill/ScrollView/Viewport/Content/goMainSkill",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_25_2",
DescDeviation = {-900, -50},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_25:Step_3()
EventManager.Hit("Guide_ShowAllSubSkill")
self.msg = {
BindIcon = "DiscPanel/----SafeAreaRoot----/---Info---/--Right--/DiscSkill/ScrollView/Viewport/Content/goSubSkill",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_25_3",
DescDeviation = {-900, -100},
Type = GameEnum.guidetype.Introductory
}
if 1 < subSkillCount then
self.msg.BindIcon = "DiscPanel/----SafeAreaRoot----/---Info---/--Right--/DiscSkill/ScrollView/Viewport/Content/goSubSkill/rtSubBg" .. subSkillCount
end
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_25:Step_4()
self.msg = {
BindIcon = "DiscPanel/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnBack",
Deviation = {0, 0},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.1
end
function GuideGroup_25:OnEvent_SelectDisc(nId)
local bHasSecondarySkill = false
local mapData = PlayerData.Disc:GetDiscById(nId)
if mapData ~= nil then
bHasSecondarySkill = mapData.tbSubSkillGroupId ~= nil and #mapData.tbSubSkillGroupId > 0
end
if bHasSecondarySkill then
subSkillCount = #mapData.tbSubSkillGroupId
self:Step_3()
else
self:Step_4()
end
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_25:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "0"})
table.insert(tab, {
"normal_tutorial_id",
"9"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
elseif current == 4 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {"action", "1"})
table.insert(tab, {
"normal_tutorial_id",
"9"
})
NovaAPI.UserEventUpload("normal_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current == 2 then
self.parent:ActiveHide(true)
EventManager.Hit("Guide_DiscSkill")
else
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_25
@@ -0,0 +1,75 @@
local GuideGroup_26 = class("GuideGroup_26")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 26
local totalStep = 1
local current = 1
function GuideGroup_26:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_26: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_26: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_26:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_26:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_26:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnTask",
Size = {120, 120},
Deviation = {0, 0},
Desc = "Guide_26_1",
DescDeviation = {-500, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_26:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_26
@@ -0,0 +1,99 @@
local GuideGroup_27 = class("GuideGroup_27")
local mapEventConfig = {}
local groupId = 27
local totalStep = 2
local current = 1
function GuideGroup_27:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_27: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_27: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_27:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_27:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_27:Step_1()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/bottomBtnList/btnFastFormation",
Deviation = {0, 2},
Head = "Icon/Head/head_11101",
Desc = "Guide_27_1",
DescDeviation = {-800, 10},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_27:Step_2()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/rtSelect/rtCur/rtMainDisc/rtDisc1/rtDisc/btnDetail",
Deviation = {0, 2},
Head = "Icon/Head/head_11101",
Desc = "Guide_27_2",
DescDeviation = {720, 50},
HandDeviation = {0, -120},
HandRotation = 0,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.2
end
function GuideGroup_27:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
self.nStarTowerGroupId = 0
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
elseif current < totalStep then
self:SendGuideStep(current)
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_27
@@ -0,0 +1,123 @@
local GuideGroup_28 = class("GuideGroup_28")
local mapEventConfig = {}
local groupId = 28
local totalStep = 3
local current = 1
function GuideGroup_28:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local bHasSubDisc = false
local LocalData = require("GameCore.Data.LocalData")
local nIdx = LocalData.GetPlayerLocalData("SavedTeamIdx")
if nIdx == nil then
nIdx = 1
end
local tmpDisc = PlayerData.Team:GetTeamDiscData(nIdx)
if 3 < #tmpDisc and tmpDisc[4] ~= 0 then
bHasSubDisc = true
end
if not bHasSubDisc then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_28: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_28: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_28:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_28:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_28:Step_1()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/rtSubDisc",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_28_1",
DescDeviation = {-950, 250},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_28:Step_2()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/rtSubDisc/imgNoteInfoBg",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_28_2",
DescDeviation = {-750, 150},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_28:Step_3()
self.msg = {
BindIcon = "MainlineFormationDiscPanelEx/----SafeAreaRoot----/bottomBtnList/btnStartBattle",
Size = {330, 110},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_28_3",
DescDeviation = {-800, 50},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_28: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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_28
@@ -0,0 +1,103 @@
local GuideGroup_29 = class("GuideGroup_29")
local TimerManager = require("GameCore.Timer.TimerManager")
local TimerScaleType = require("GameCore.Timer.TimerScaleType")
local mapEventConfig = {}
local groupId = 29
local totalStep = 2
local current = 1
function GuideGroup_29:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_29: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_29: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_29:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_29:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_29:Step_1()
self.msg = {
BindIcon = "DiscSkillActivePanel/----SafeAreaRoot----/goNoteList/noteListSv/Viewport/noteContent/goNoteItem(Clone)",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_29_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_29:Step_2()
self.msg = {
BindIcon = "DiscSkillActivePanel/----SafeAreaRoot----/---Title---/btnDepot",
Size = {150, 120},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_29_2",
DescDeviation = {800, -400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_29: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_29
@@ -0,0 +1,118 @@
local GuideGroup_3 = class("GuideGroup_3")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 3
local totalStep = 2
local current = 1
local NewBieId = 5
function GuideGroup_3:Init(parent, runStep)
self:BindEvent()
self.parent = parent
if PlayerData.Gacha:GetGachaNewbieData(NewBieId).Receive == false then
local callback = function()
if PlayerData.Gacha:GetGachaNewbieData(NewBieId).Receive == false then
current = 1
else
current = 2
end
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
PlayerData.Gacha:GetGachaNewbieInfomation(callback)
return
else
current = 2
end
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_3: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_3: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_3:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_3:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_3:Step_1()
local confirmCallback = function()
self:Step_2()
end
local cancelCallback = function()
local func = function()
EventManager.Hit(EventId.OpenPanel, PanelId.GachaSpin, 5)
end
EventManager.Hit(EventId.SetTransition, 6, func, AllEnum.MainViewCorner.Recruit)
self.parent:ClearCurGuide(false)
end
local msg = {
nType = AllEnum.MessageBox.Confirm,
sContent = ConfigTable.GetUIText("Guide_3_1"),
callbackConfirm = confirmCallback,
callbackCancel = cancelCallback
}
EventManager.Hit(EventId.OpenMessageBox, msg)
self.parent:ActiveHide(true)
current = 1
end
function GuideGroup_3:Step_2()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap",
CloseObj = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap/anti_scale",
Size = {330, 200},
Deviation = {10, -8},
Head = "Icon/Head/head_11101",
Desc = "Guide_3_2",
DescDeviation = {-750, 60},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_3:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
end
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_3
@@ -0,0 +1,146 @@
local GuideGroup_30 = class("GuideGroup_30")
local mapEventConfig = {
Guide_OpenStarTowerDepot = "OnEvent_OpenStarTowerDepot"
}
local groupId = 30
local totalStep = 3
local current = 1
function GuideGroup_30:Init(parent, runStep)
self:BindEvent()
self.parent = parent
if PlayerData.Base:GetWorldClass() >= 6 then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_30: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_30: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_30:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_30:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_30:Step_1()
EventManager.Hit("Guide_SelectQuestPage", AllEnum.QuestPanelTab.WorldClass)
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtWorldClass/rtLevel",
Size = {500, 500},
Deviation = {0, -138},
Head = "Icon/Head/head_11101",
Desc = "Guide_30_1",
DescDeviation = {850, -370},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_30:Step_2()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtWorldClass/rtWorldClassList/worldClassLsv/Viewport/Content/1/btnGrid",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_30_2",
DescDeviation = {-770, -370},
HandDeviation = {0, -150},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.4
end
function GuideGroup_30:Step_3()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtWorldClass/rtLevelInfo/rtQuestLsv/questLsv/Viewport/Content",
Size = {970, 400},
Deviation = {490, -200},
Head = "Icon/Head/head_11101",
Desc = "Guide_30_3",
DescDeviation = {-480, -450},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.3
end
function GuideGroup_30:OnEvent_OpenStarTowerDepot()
if current == 2 then
EventManager.Hit("Guide_SelectDepotTog", 3)
self:Step_3()
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
end
function GuideGroup_30:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
self.nStarTowerGroupId = 0
if current == 2 then
self:SendGuideStep(-1)
elseif current < 2 then
self:SendGuideStep(current)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_30
@@ -0,0 +1,81 @@
local GuideGroup_31 = class("GuideGroup_31")
local mapEventConfig = {}
local groupId = 31
local totalStep = 1
local current = 1
function GuideGroup_31:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
if PlayerData.Base:GetWorldClass() >= 6 then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_31: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_31: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_31:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_31:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_31:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnTask",
Size = {120, 120},
Deviation = {0, 0},
Head = "Icon/Head/head_999901",
Desc = "Guide_31_1",
DescDeviation = {-500, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_31:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_31
@@ -0,0 +1,143 @@
local GuideGroup_32 = class("GuideGroup_32")
local TimerManager = require("GameCore.Timer.TimerManager")
local TimerScaleType = require("GameCore.Timer.TimerScaleType")
local mapEventConfig = {
Guide_StarTowerDepotDisc = "OnEvent_StarTowerDepotDisc"
}
local groupId = 32
local totalStep = 4
local current = 1
function GuideGroup_32:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_32: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_32: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_32:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_32:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_32:Step_1()
self.msg = {
BindIcon = "StarTowerDepotPanel/----SafeAreaRoot----/---DiscSkill---/goNoteListBtn",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_32_1",
DescDeviation = {-550, -400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.3
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_32:Step_2()
self.msg = {
BindIcon = "StarTowerDepotPanel/----SafeAreaRoot----/---DiscSkill---/svDiscSkill/Viewport/goDiscSkillContent/goHarmonyGrid/HarmonySkillDepotItem(Clone)/btnItem",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_32_2",
DescDeviation = {0, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_32:Step_3()
self.msg = {
BindIcon = "StarTowerDepotPanel/----SafeAreaRoot----/---DiscSkill---/svDiscSkill",
Size = {0, 0},
Deviation = {1200, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_32_3",
DescDeviation = {0, 0},
Type = GameEnum.guidetype.Introductory,
isNoMiddle = true
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_32:Step_4()
self.msg = {
BindIcon = "StarTowerDepotPanel/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnBack",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_32_4",
DescDeviation = {870, -400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.1
end
function GuideGroup_32:OnEvent_StarTowerDepotDisc(bHasSkill)
self.bHasSkill = bHasSkill
end
function GuideGroup_32: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
if current ~= 1 then
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
elseif current == 1 then
if self.bHasSkill then
self:Step_2()
else
self:Step_3()
end
end
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_32
@@ -0,0 +1,375 @@
local GuideGroup_4 = class("GuideGroup_4")
local mapEventConfig = {
Positioning_Char_Grid = "OnEvent_PositioningCharGrid",
Guide_LoadFormationSuccess = "OnEvent_LoadFormationSuccess",
Guide_LoadCharacterSuccess = "OnEvent_LoadCharacterSuccess"
}
local groupId = 4
local totalStep = 13
local current = 1
function GuideGroup_4:Init(parent, runStep)
self:BindEvent()
self.tabChar = {}
self.parent = parent
current = 1
self.parent:ActiveHide(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(1.2))
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
cs_coroutine.start(wait)
end
function GuideGroup_4: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_4: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_4:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_4:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.tabChar = nil
end
function GuideGroup_4:Step_1()
local tbOption = {
AllEnum.ChooseOption.Char_Element,
AllEnum.ChooseOption.Char_Rarity,
AllEnum.ChooseOption.Char_PowerStyle,
AllEnum.ChooseOption.Char_AffiliatedForces,
AllEnum.ChooseOption.Char_TacticalStyle
}
PlayerData.Filter:Reset(tbOption)
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/bgLeft/btnStarTower",
Size = {420, 680},
Deviation = {0, -2},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_1",
DescDeviation = {-750, -250},
HandDeviation = {-300, 22},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(false)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_4:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/SecondMenu/StarTower/btnStarTowerGoto",
Size = {420, 150},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_2",
DescDeviation = {-900, 20},
HandDeviation = {0, -270},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 1
end
function GuideGroup_4:Step_3()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/rt_StarTowerInfo/rt_Info/btnGo",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
HandDeviation = {0, 160},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
local _, tbTeamMemberId = PlayerData.Team:GetTeamData(1)
if tbTeamMemberId ~= nil then
local tmpDisc = PlayerData.Team:GetTeamDiscData(1)
PlayerData.Team:UpdateFormationInfo(1, {
0,
0,
0
}, tmpDisc)
end
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.32
end
function GuideGroup_4:Step_4()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/----Char----/goChar1/btnSelect",
Size = {180, 180},
Deviation = {0, 100},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_4",
DescDeviation = {-430, 300},
HandDeviation = {0, -70},
Type = GameEnum.guidetype.ForcedClick,
CallB = function()
EventManager.Hit("OnEvent_OpenSelectTeamMemberList", 1)
EventManager.Hit("Guide_FormationChar_OpenList", 1, true)
end
}
self.parent:ActiveHide(true)
current = 4
end
function GuideGroup_4:Step_5()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/sv",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_5",
DescDeviation = {-930, 300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.25
end
function GuideGroup_4:Step_6()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/sv/Viewport/rtCharListContent/0/btnGrid",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_6",
DescDeviation = {-730, 80},
HandDeviation = {0, -200},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
EventManager.Hit("Guide_PositionCharPos", 103)
end
function GuideGroup_4:Step_7()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/----Char----/goChar1/btnSelect",
Deviation = {0, 50},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_7",
DescDeviation = {870, 330},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 7
end
function GuideGroup_4:Step_8()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/sv/Viewport/rtCharListContent/0/btnGrid",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_8",
DescDeviation = {-730, 80},
HandDeviation = {0, -200},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 8
EventManager.Hit("Guide_PositionCharPos", 111)
end
function GuideGroup_4:Step_9()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/sv/Viewport/rtCharListContent/0/btnGrid",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_9",
DescDeviation = {-730, 80},
HandDeviation = {0, -200},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 9
EventManager.Hit("Guide_PositionCharPos", 112)
end
function GuideGroup_4:Step_10()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/----Char----/goChar2/btnSelect",
Size = {520, 850},
Deviation = {15, 50},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_10",
DescDeviation = {870, 330},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 10
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_4:Step_11()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/btnConfirm",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_11",
DescDeviation = {-580, 180},
HandDeviation = {0, 140},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 11
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_4:Step_12()
local tmpDisc = PlayerData.Team:GetTeamDiscData(1)
local haveDis = false
for i, v in pairs(tmpDisc) do
if v ~= 0 then
haveDis = true
break
end
end
if haveDis then
local _, tbTeamMemberId = PlayerData.Team:GetTeamData(1)
PlayerData.Team:UpdateFormationInfo(1, tbTeamMemberId, {
0,
0,
0,
0,
0,
0
})
end
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/btnStartBattle",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_12",
DescDeviation = {-580, 180},
HandDeviation = {0, 140},
HandDeviation = {0, 140},
HandRotation = 180,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 12
self.waitAnimTime = 0.2
end
function GuideGroup_4:Step_13()
self.msg = {
BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/btnFastFormation",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
Desc = "Guide_4_13",
DescDeviation = {-580, 180},
HandDeviation = {0, 140},
HandDeviation = {0, 140},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 13
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_4:OnEvent_PositioningCharGrid(charId, gridName)
if self.tabChar == nil then
self.tabChar = {}
end
self.tabChar[charId] = gridName
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
if current == 6 or current == 8 or current == 9 or current == 10 then
self.msg.BindIcon = "MainlineFormationScenePanel/----SafeAreaRoot----/--CharList--/sv/Viewport/rtCharListContent/" .. gridName .. "/btnGrid"
self.parent:PlayTypeMask(self.msg)
end
end
cs_coroutine.start(wait)
end
function GuideGroup_4:OnEvent_LoadFormationSuccess()
if current == 4 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.8))
EventManager.Hit("Guide_FormationChar_OpenList", 1, false)
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_4:OnEvent_LoadCharacterSuccess()
if current == 7 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_4:OnEvent_OpenStarTowerLevelMenu()
if current == 1 then
self.parent:ActiveHide(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(1))
self:Step_2()
end
cs_coroutine.start(wait)
end
end
function GuideGroup_4:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"15"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
elseif current == 12 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"16"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < 12 then
self:SendGuideStep(current)
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
elseif current == 12 then
self:SendGuideStep(-1)
local charCount = PlayerData.Char:GetAllCharCount()
if charCount <= 3 then
self.parent:ClearCurGuide(true)
else
self:Step_13()
end
return
elseif current == 13 then
self.parent:ClearCurGuide(true)
return
end
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_4
@@ -0,0 +1,77 @@
local GuideGroup_41 = class("GuideGroup_41")
local mapEventConfig = {}
local groupId = 41
local totalStep = 1
local current = 1
function GuideGroup_41:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_41: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_41: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_41:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_41:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_41:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnRole",
Size = {140, 140},
Deviation = {0, 0},
Desc = "Guide_41_1",
DescDeviation = {-630, 260},
HandDeviation = {-150, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_41:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == totalStep then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_41
@@ -0,0 +1,105 @@
local GuideGroup_42 = class("GuideGroup_42")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 42
local totalStep = 2
local current = 1
function GuideGroup_42:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_42: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_42: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_42:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_42:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_42:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMainline",
Size = {140, 140},
Deviation = {0, 0},
Desc = "Guide_42_1",
DescDeviation = {-830, 0},
HandDeviation = {-150, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_42:Step_2()
self.msg = {
BindIcon = "StoryEntrancePanel/----SafeAreaRoot----/goMainline",
Size = {950, 730},
Deviation = {0, -25},
Desc = "Guide_42_2",
DescDeviation = {1000, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.StoryEntrance
self.waitAnimTime = 0.2
end
function GuideGroup_42:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_42:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == totalStep then
PlayerData.Base:UserEventUpload_PC("pc_tutorial_complete")
self.parent:ClearCurGuide(true)
return
elseif current == 1 then
self:SendGuideStep(-1)
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_42
@@ -0,0 +1,122 @@
local GuideGroup_43 = class("GuideGroup_43")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 43
local totalStep = 4
local current = 1
function GuideGroup_43:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_43: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_43: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_43:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_43:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_43:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnPhone",
Deviation = {0, 0},
Desc = "Guide_43_1",
DescDeviation = {-620, -180},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_43:Step_2()
self.msg = {
BindIcon = "PhonePanel/goContent/----SafeAreaRoot----/PhoneList/addressBookListLSV/Viewport/Content/0",
Size = {700, 146},
Deviation = {310, -73},
Desc = "Guide_43_2",
DescDeviation = {1180, -241},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.Phone
self.waitAnimTime = 1
end
function GuideGroup_43:Step_3()
self.msg = {
BindIcon = "PhonePanel/goContent/----SafeAreaRoot----/PhoneList/goTab/btnDating",
Deviation = {0, 0},
Desc = "Guide_43_3",
DescDeviation = {680, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_43:Step_4()
self.msg = {
BindIcon = "PhonePanel/goContent/----SafeAreaRoot----/PhoneList/goTab/btnGift",
Deviation = {0, 0},
Desc = "Guide_43_4",
DescDeviation = {680, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_43:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and current == 2 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_43:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_43
@@ -0,0 +1,83 @@
local GuideGroup_44 = class("GuideGroup_44")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 44
local totalStep = 2
local current = 1
function GuideGroup_44:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_44: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_44: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_44:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_44:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_44:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopLeft--/trBtnList/btnActivity",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_44_1",
DescDeviation = {620, -180},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_44:Step_2()
self.openPanelId = PanelId.ActivityList
current = 2
end
function GuideGroup_44:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and current == 2 then
local wait = function()
self.parent:ClearCurGuide(true)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_44:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
self:Step_2()
end
end
return GuideGroup_44
@@ -0,0 +1,114 @@
local GuideGroup_45 = class("GuideGroup_45")
local mapEventConfig = {}
local groupId = 45
local totalStep = 4
local current = 1
function GuideGroup_45:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_45: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_45: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_45:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_45:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_45:Step_1()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Advance---/rtInfo/rtUp",
Size = {840, 460},
Deviation = {0, 20},
Desc = "Guide_45_1",
DescDeviation = {-840, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(1))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_45:Step_2()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Advance---/rtInfo/rtUp",
Size = {840, 240},
Deviation = {0, 10},
Desc = "Guide_45_2",
DescDeviation = {-840, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_45:Step_3()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Advance---/rtMat/svMat/Viewport/Content/goMat1",
Deviation = {0, 0},
Desc = "Guide_45_3",
DescDeviation = {-620, -50},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_45:Step_4()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Advance---/btnAdvance",
Deviation = {0, 0},
Desc = "Guide_45_4",
DescDeviation = {-880, -20},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_45:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_45
@@ -0,0 +1,121 @@
local GuideGroup_46 = class("GuideGroup_46")
local mapEventConfig = {
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 46
local totalStep = 3
local current = 1
function GuideGroup_46:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_46: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_46: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_46:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_46:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_46:Step_1()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Upgrade---/NotMax/rtInfo/level",
Size = {800, 120},
Deviation = {0, 0},
Desc = "Guide_46_1",
DescDeviation = {-900, -100},
Type = GameEnum.guidetype.Introductory
}
current = 1
self.parent:ActiveHide(true)
self.waitAnimTime = 1
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_46:Step_2()
self.msg = {
BindIcon = "CharDevelopmentPanel/----SafeAreaRoot----/---Upgrade---/NotMax/rtInfo/btnOpenAdInfo1",
Size = {100, 100},
Deviation = {0, 0},
Desc = "Guide_46_2",
DescDeviation = {-580, -120},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_46:Step_3()
self.msg = {
BindIcon = "CharAdvancePreviewInfoPanel/advancePreviewInfo/goContent/InfoBg/AdPre",
Deviation = {0, 0},
Desc = "Guide_46_3",
DescDeviation = {-130, -250},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 1
end
function GuideGroup_46:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
if self.waitAnimTime ~= 0 and current == 3 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
local tempRoot = GameObject.Find("---- UI ----").transform
local btn = tempRoot:Find("CharAdvancePreviewInfoPanel/advancePreviewInfo/goContent/AdNodeScrollView/Viewport/AdvanceNodeContent/2/btnNode"):GetComponent("UIButton")
btn.onClick:Invoke()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_46
@@ -0,0 +1,125 @@
local GuideGroup_47 = class("GuideGroup_47")
local mapEventConfig = {
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 47
local totalStep = 3
local current = 1
function GuideGroup_47:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_47: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_47: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_47:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_47:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_47:Step_1()
self.msg = {
BindIcon = "StarTowerGrowthPanel/----SafeAreaRoot----/svNode/Viewport/NodeContent/KeyNodeList(Clone)",
Size = {414, 400},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_47_1",
DescDeviation = {200, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.6
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.1))
local tempRoot = GameObject.Find("---- UI ----").transform
local btn = tempRoot:Find("StarTowerGrowthPanel/----SafeAreaRoot----/--Tab--/tab1/btnTab1"):GetComponent("UIButton")
btn.onClick:Invoke()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_47:Step_2()
self.msg = {
BindIcon = "StarTowerGrowthPanel/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnBack",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_47_2",
DescDeviation = {650, -150},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_47:Step_3()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---StarTower---/svStarTower",
AutoDeviationCenter = true,
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_47_3",
DescDeviation = {1620, -540},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_47:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.StarTowerGrowth and current == 2 then
self.parent:ActiveHide(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
self:Step_3()
end
cs_coroutine.start(wait)
end
end
function GuideGroup_47:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == 2 then
return
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_47
@@ -0,0 +1,114 @@
local GuideGroup_48 = class("GuideGroup_48")
local mapEventConfig = {
Guide_SelectTowerSweepHard = "OnEvent_SelectTowerSweepHard"
}
local groupId = 48
local totalStep = 3
local current = 1
local selectIndex = 1
function GuideGroup_48:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_48: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_48: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_48:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_48:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_48:Step_1()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/---Sweep---/goSweepTickets",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_48_1",
DescDeviation = {-700, -120},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_48:Step_2()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/rt_StarTowerInfo/rt_Toggle/Viewport/rt_ToggleContent/tog" .. selectIndex,
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_48_2",
DescDeviation = {940, -150},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
local tempRoot = GameObject.Find("---- UI ----").transform
local btn = tempRoot:Find(self.msg.BindIcon):GetComponent("UIButton")
btn.onClick:Invoke()
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_48:Step_3()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/---Sweep---/btnSweep",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_48_3",
DescDeviation = {-310, 190},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_48:OnEvent_SelectTowerSweepHard(nHard)
selectIndex = nHard
end
function GuideGroup_48:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_48
@@ -0,0 +1,151 @@
local GuideGroup_49 = class("GuideGroup_49")
local mapEventConfig = {}
local groupId = 49
local totalStep = 5
local current = 1
local selectIndex = 1
function GuideGroup_49:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_49: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_49: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_49:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_49:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_49:Step_1()
self.msg = {
BindIcon = "CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill1/AnimRoot/Select",
Deviation = {0, 0},
Desc = "Guide_49_1",
DescDeviation = {800, -180},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.3
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_49:Step_2()
local tempRoot = GameObject.Find("---- UI ----").transform
local tmpBtn = tempRoot:Find("CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill2"):GetComponent("UIButton")
tmpBtn.onClick:Invoke()
self.msg = {
BindIcon = "CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill2/AnimRoot/Select",
Deviation = {0, 0},
Desc = "Guide_49_2",
DescDeviation = {940, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.2
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_49:Step_3()
local tempRoot = GameObject.Find("---- UI ----").transform
local tmpBtn = tempRoot:Find("CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill3"):GetComponent("UIButton")
tmpBtn.onClick:Invoke()
self.msg = {
BindIcon = "CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill3/AnimRoot/Select",
Deviation = {0, 0},
Desc = "Guide_49_3",
DescDeviation = {940, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.2
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_49:Step_4()
local tempRoot = GameObject.Find("---- UI ----").transform
local tmpBtn = tempRoot:Find("CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill4"):GetComponent("UIButton")
tmpBtn.onClick:Invoke()
self.msg = {
BindIcon = "CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goSkillBtn/goSkill4/AnimRoot/Select",
Deviation = {0, 0},
Desc = "Guide_49_4",
DescDeviation = {940, 190},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.2
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_49:Step_5()
self.msg = {
BindIcon = "CharSkillPanel/----ContentRoot----/----SafeAreaRoot----/--Upgrade--/goRoot/goMaterial/goMat1/btnMat1",
Deviation = {0, 0},
Desc = "Guide_49_5",
DescDeviation = {-680, 0},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_49:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_49
@@ -0,0 +1,173 @@
local GuideGroup_5 = class("GuideGroup_5")
local TimerManager = require("GameCore.Timer.TimerManager")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
[EventId.ClosePanel] = "OnEvent_ClosePanel"
}
local groupId = 5
local totalStep = 6
local current = 1
function GuideGroup_5:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_5: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_5: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_5:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_5:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_5:Step_1()
self.msg = {
BindIcon = "StarTowerBuildSavePanel/----SafeAreaRoot----/goBuildContent/ContentList/imgBg",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_5_1",
DescDeviation = {-475, -520},
Type = GameEnum.guidetype.Introductory
}
current = 1
local run = function()
self.parent:PlayTypeMask(self.msg)
end
TimerManager.Add(1, 0.4, nil, run, true, true, true, nil)
end
function GuideGroup_5:Step_2()
self.msg = {
BindIcon = "StarTowerBuildSavePanel/----SafeAreaRoot----/goBuildContent/BuildDetail/imgRareScore",
Size = {140, 160},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_5_2",
DescDeviation = {650, 0},
Type = GameEnum.guidetype.Introductory
}
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_5:Step_3()
self.msg = {
BindIcon = "StarTowerBuildSavePanel/----SafeAreaRoot----/goBuildContent/BuildDetail/imgBg",
Size = {600, 640},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_5_3",
DescDeviation = {850, 200},
Type = GameEnum.guidetype.Introductory
}
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_5:Step_4()
self.msg = {
BindIcon = "StarTowerBuildSavePanel/----SafeAreaRoot----/goBuildContent/img_BottomBar/btnSave",
Deviation = {0, 4},
Head = "Icon/Head/head_11101",
Desc = "Guide_5_4",
DescDeviation = {-750, 60},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_5:Step_5()
current = 5
self.nEntryId = 200201
self.parent:ActiveHide(true)
end
function GuideGroup_5:Step_6()
self.msg = {
BindIcon = "StarTowerLevelSelect/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnHome",
Deviation = {0, 0},
DescDeviation = {540, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_5:OnEvent_PanelOnEnableById(_panelId)
if current == 5 and _panelId == PanelId.StarTowerLevelSelect then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.44999999999999996))
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, self.nEntryId)
self.parent:ActiveHide(false)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_5:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.DictionaryEntry and current == 5 then
self:Step_6()
end
end
function GuideGroup_5:FinishCurrentStep()
self.msg = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 4 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"21"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
elseif current == 4 then
if PanelManager.CheckPanelOpen(PanelId.StarTowerLevelSelect) then
self:Step_5()
else
self.parent:ClearCurGuide(true)
end
return
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
function GuideGroup_5:OnEvent_GuideAniEnd(aniName)
if self.waitAinEnd and not self.runGuide and self.waitAinEnd == aniName then
self.runGuide = true
self.parent:PlayTypeMask(self.msg)
end
end
return GuideGroup_5
@@ -0,0 +1,138 @@
local GuideGroup_50 = class("GuideGroup_50")
local mapEventConfig = {}
local groupId = 50
local totalStep = 5
local current = 1
function GuideGroup_50:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_50: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_50: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_50:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_50:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_50:Step_1()
self.msg = {
BindIcon = "CharEquipmentPanel/----SafeAreaRoot----/----FunctionPanel----/EquipmentSlot/btnEquipmentSlot1",
Deviation = {0, 0},
Desc = "Guide_50_1",
DescDeviation = {-690, 0},
HandDeviation = {0, -200},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.7
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_50:Step_2()
self.msg = {
BindIcon = "EquipmentInfoPanel/----SafeAreaRoot----/window/goContent/--Active--/goMat",
Deviation = {0, 0},
Desc = "Guide_50_2",
DescDeviation = {530, -170},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.7
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_50:Step_3()
self.msg = {
BindIcon = "EquipmentInfoPanel/----SafeAreaRoot----/window/goContent/--Active--/btnActive",
Deviation = {0, 0},
Desc = "Guide_50_3",
DescDeviation = {530, 170},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_50:Step_4()
self.msg = {
BindIcon = "EquipmentInfoPanel/----SafeAreaRoot----/window/goContent/--Info--/Image",
Deviation = {0, 0},
Desc = "Guide_50_4",
DescDeviation = {460, 210},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.5
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_50:Step_5()
self.msg = {
BindIcon = "EquipmentInfoPanel/----SafeAreaRoot----/window/goContent/--Info--/btnEquip",
Deviation = {0, 0},
Desc = "Guide_50_5",
DescDeviation = {660, 140},
HandDeviation = {0, -100},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_50:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_50
@@ -0,0 +1,122 @@
local GuideGroup_51 = class("GuideGroup_51")
local mapEventConfig = {}
local groupId = 51
local totalStep = 4
local current = 1
function GuideGroup_51:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_51: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_51: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_51:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_51:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_51:Step_1()
self.msg = {
BindIcon = "CharacterRelationPanel/----SafeAreaRoot----/Favorability/imgFavourHeartBg/imgHeartBg",
Size = {300, 170},
Deviation = {0, 40},
Desc = "Guide_51_1",
DescDeviation = {680, -120},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(1))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_51:Step_2()
self.msg = {
BindIcon = "CharacterRelationPanel/----SafeAreaRoot----/Favorability/goFavourTask",
Size = {160, 160},
Deviation = {0, 0},
Desc = "Guide_51_2",
DescDeviation = {680, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_51:Step_3()
self.msg = {
BindIcon = "CharacterRelationPanel/----SafeAreaRoot----/Favorability/goFavourReward",
Size = {160, 160},
Deviation = {0, 0},
Desc = "Guide_51_3",
DescDeviation = {680, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_51:Step_4()
self.msg = {
BindIcon = "CharacterRelationPanel/----SafeAreaRoot----/CharRecordInfoRoot/PlotRoot/---PlotList---/sv/Viewport/Content/2",
Deviation = {460, -98},
Desc = "Guide_51_4",
DescDeviation = {-570, -98},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
local tempRoot = GameObject.Find("---- UI ----").transform
local btn = tempRoot:Find("CharacterRelationPanel/----SafeAreaRoot----/CharRecordInfoRoot/tcGroup/recordTog3"):GetComponent("UIButton")
btn.onClick:Invoke()
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_51:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_51
@@ -0,0 +1,137 @@
local GuideGroup_54 = class("GuideGroup_54")
local mapEventConfig = {}
local groupId = 54
local totalStep = 4
local current = 1
function GuideGroup_54:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_54: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_54: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_54:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_54:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_54:Step_1()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Right---/goNotEmpty/sv",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_104_3",
DescDeviation = {-850, 340},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.waitAnimTime = 0.5
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_54:Step_2()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Left---/btnSkin",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_104_4",
DescDeviation = {660, 40},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_54:Step_3()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Left---/btnChange",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_104_4",
DescDeviation = {660, 40},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_54:Step_4()
self.msg = {
BindIcon = "ChooseHomePageRolePanel/----SafeAreaRoot----/---Left---/btnOrderArrow",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_104_4",
DescDeviation = {660, 40},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_54:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.ReceivePropsTips and current == 1 then
self.parent:ActiveHide(true)
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_54:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_54:ShowMainViewUI()
if current == 2 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_54:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
self:SendGuideStep(-1)
elseif current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_54
@@ -0,0 +1,201 @@
local GuideGroup_6 = class("GuideGroup_6")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Guide_SelectGuideGroupGrid = "OnEvent_SelectGuideGroupGrid",
Guide_CloseGuideQuestReward = "OnEvent_Guide_CloseGuideQuestReward"
}
local groupId = 6
local totalStep = 5
local current = 1
function GuideGroup_6:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_6: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_6: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_6:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_6:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_6:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--TopRight--/trBtnList/btnTask",
Size = {120, 120},
Deviation = {0, 0},
Desc = "Guide_6_1",
DescDeviation = {-500, -280},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_6:Step_2()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtLevel",
Size = {340, 350},
Deviation = {30, 0},
Desc = "Guide_6_2",
DescDeviation = {750, 100},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.Quest
self.waitAnimTime = 0.3
end
function GuideGroup_6:Step_3()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtGuideQuest/questList",
Deviation = {0, 0},
Desc = "Guide_6_3",
DescDeviation = {-930, -420},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.1
end
function GuideGroup_6:Step_4()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtGuideQuest/questList/guideQuestLSV/Viewport/Content/0/btnGrid/AnimRoot/btnReceive",
Deviation = {0, 0},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.2
end
function GuideGroup_6:Step_5()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/TopBarPanel/Area/goBack/btnHome",
Deviation = {0, 0},
HandDeviation = {0, -120},
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 5
self.waitAnimTime = 0.2
end
function GuideGroup_6:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId then
if self.waitAnimTime == nil or self.waitAnimTime == 0 then
if current == 17 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
elseif self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
end
function GuideGroup_6:OnEvent_SelectGuideGroupGrid(nQuestId, nIndex)
if self.nQuestId == nQuestId then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
if current == 4 then
self.msg.BindIcon = "QuestPanel/----SafeAreaRoot----/rtGuideQuest/questList/guideQuestLSV/Viewport/Content/" .. nIndex .. "/btnGrid/AnimRoot/btnReceive"
self.parent:PlayTypeMask(self.msg)
end
end
cs_coroutine.start(wait)
end
end
function GuideGroup_6:OnEvent_Guide_CloseGuideQuestReward()
if current == 4 then
self:Step_5()
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
end
function GuideGroup_6:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"22"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current == 1 then
self:SendGuideStep(-1)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current == 3 then
self.nQuestId = PlayerData.Quest:GetTourGuideQuestRewardId()
if self.nQuestId ~= 0 then
EventManager.Hit("Guide_SelectTourGuideQuest", self.nQuestId)
self:Step_4()
else
self:Step_5()
end
elseif current ~= 4 then
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_6
@@ -0,0 +1,186 @@
local GuideGroup_7 = class("GuideGroup_7")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 7
local totalStep = 6
local current = 1
function GuideGroup_7:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_7: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_7: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_7:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_7:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_7:Step_1()
self.msg = {
BindIcon = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap",
CloseObj = "MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnMap/anti_scale",
Size = {330, 200},
Deviation = {10, -8},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_1",
DescDeviation = {-750, 60},
HandDeviation = {0, 180},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_7:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/btnResource",
Size = {450, 360},
Deviation = {0, 170},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_2",
DescDeviation = {-800, -40},
HandDeviation = {-300, 160},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.LevelMenu
self.waitAnimTime = 0.2
end
function GuideGroup_7:Step_3()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---Resource---/svResource/Viewport/Content/btnTimes",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_3",
DescDeviation = {860, -210},
HandDeviation = {0, 200},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.55
end
function GuideGroup_7:Step_4()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/SecondMenu/Resource/btnResourceGoto",
Size = {800, 430},
Deviation = {0, 120},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_4",
DescDeviation = {-1000, 0},
HandDeviation = {-500, 160},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.5
end
function GuideGroup_7:Step_5()
self.msg = {
BindIcon = "DailyInstanceLevelSelectEx/----SafeAreaRoot----/rt_DailyInstanceInfo/right/rtChangeReward/btnChange",
Size = {680, 200},
Deviation = {-230, 40},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_5",
DescDeviation = {-900, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.openPanelId = PanelId.DailyInstanceLevelSelect
self.waitAnimTime = 0.2
end
function GuideGroup_7:Step_6()
self.msg = {
BindIcon = "DailyInstanceLevelSelectEx/----SafeAreaRoot----/rt_DailyInstanceInfo/btnGo",
Deviation = {0, 2},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_6",
DescDeviation = {-730, 80},
HandDeviation = {0, 100},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
self.waitAnimTime = 0.24
end
function GuideGroup_7:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_7:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 2 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"23"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_7
@@ -0,0 +1,169 @@
local GuideGroup_8 = class("GuideGroup_8")
local mapEventConfig = {
[EventId.ClosePanel] = "OnEvent_ClosePanel",
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
Guide_RegionBossRefresh = "OnEvent_RegionBossRefresh",
Guide_LoadCharacterSuccess = "OnEvent_LoadCharacterSuccess"
}
local groupId = 8
local totalStep = 3
local current = 1
function GuideGroup_8:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_8: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_8: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_8:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_8:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_8:Step_1()
self.msg = {
BindIcon = "RegionBossFormationPanel/----SafeAreaRoot----/---None---/SelectTeam/btnAddBuild",
Size = {760, 500},
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_8_1",
DescDeviation = {0, -400},
HandDeviation = {-450, 0},
HandRotation = -90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_8:Step_2()
self.msg = {
BindIcon = "RegionBossBuildPanel/----SafeAreaRoot----/ExistContent/ListContent/BuildListContent/BuildList/Viewport/Content/0/btn_grid",
Size = {500, 520},
Deviation = {-3, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_8_2",
DescDeviation = {1000, -260},
HandDeviation = {300, 0},
HandRotation = 90,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.openPanelId = PanelId.RogueBossBuildBrief
self.waitAnimTime = 0.3
end
function GuideGroup_8:Step_3()
self.msg = {
BindIcon = "RegionBossFormationPanel/----SafeAreaRoot----/btnStartBattle",
Deviation = {0, 0},
Head = "Icon/Head/head_11101",
Desc = "Guide_8_3",
DescDeviation = {-550, 160},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
end
function GuideGroup_8:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and current == 3 then
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
else
self.parent:PlayTypeMask(self.msg)
end
end
end
function GuideGroup_8:OnEvent_RegionBossRefresh()
if current == 2 then
local bHasBuild = PlayerData.Build:CheckHasBuild()
if not bHasBuild then
self.parent:ClearCurGuide(true)
return
end
end
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_8:OnEvent_LoadCharacterSuccess()
if current == 3 then
self.parent:PlayTypeMask(self.msg)
end
end
function GuideGroup_8:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.RogueBossBuildBrief and current == 1 then
self.parent:ClearCurGuide(true)
end
end
function GuideGroup_8:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.waitAnimTime = 0
self.runGuide = false
if current == 1 then
local tab = {}
table.insert(tab, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
table.insert(tab, {
"newbie_tutorial_id",
"24"
})
NovaAPI.UserEventUpload("newbie_tutorial", tab)
end
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
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
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_8
@@ -0,0 +1,173 @@
local GuideGroup_9 = class("GuideGroup_9")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById",
[EventId.ClosePanel] = "OnEvent_ClosePanel",
Guide_ReceiveWorldClassReward = "OnEvent_ReceiveWorldClassReward"
}
local groupId = 9
local totalStep = 4
local current = 1
function GuideGroup_9:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_9: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_9: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_9:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_9:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
EventManager.Hit("Guide_DisableScrollView", false)
end
function GuideGroup_9:Step_1()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtGuideQuest/imgChapterBg",
Deviation = {0, 0},
Desc = "Guide_9_1",
DescDeviation = {-500, -280},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.4))
EventManager.Hit("Guide_SelectQuestPage", AllEnum.QuestPanelTab.GuideQuest)
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.1))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_9:Step_2()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtTab/trTabOff/tab2/btnTab2",
Deviation = {0, 0},
Desc = "Guide_9_2",
DescDeviation = {0, 350},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.waitAnimTime = 0.1
end
function GuideGroup_9:Step_3()
EventManager.Hit("Guide_DisableScrollView", true)
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtWorldClass/rtLevelInfo/rtLevelLsv/levelLsv/Viewport/Content/1/btnGrid/AnimRoot/imgBg/goLevel/btnReceive",
Deviation = {0, 0},
Desc = "Guide_9_3",
DescDeviation = {-800, -130},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.waitAnimTime = 0.5
end
function GuideGroup_9:Step_4()
self.msg = {
BindIcon = "QuestPanel/----SafeAreaRoot----/rtWorldClass/rtLevel",
Size = {350, 380},
Deviation = {0, -30},
Desc = "Guide_9_4",
DescDeviation = {550, -210},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.waitAnimTime = 0.2
end
function GuideGroup_9:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and current == 2 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
function GuideGroup_9:OnEvent_ClosePanel(nPanelId)
if nPanelId ~= nil and nPanelId == PanelId.Quest then
self.parent:ClearCurGuide(true)
end
end
function GuideGroup_9:OnEvent_ReceiveWorldClassReward()
if current == 3 then
self:Step_4()
if self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
end
function GuideGroup_9:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 3 then
self:SendGuideStep(-1)
elseif current < 3 then
self:SendGuideStep(current)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
if current == 2 then
local bUnReceive = PlayerData.Base:GetWorldClassState(2)
if not bUnReceive then
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
return
end
elseif current == 3 then
EventManager.Hit("Guide_DisableScrollView", false)
end
if current ~= 3 then
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
if self.openPanelId == nil and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime + 0.2))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_9
+18
View File
@@ -0,0 +1,18 @@
local GuidePanel = class("GuidePanel", BasePanel)
GuidePanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
GuidePanel._bAddToBackHistory = false
GuidePanel._tbDefine = {
{
sPrefabPath = "Guide/GuidePanel.prefab",
sCtrlName = "Game.UI.Guide.GuideCtrl"
}
}
function GuidePanel:Awake()
end
function GuidePanel:OnEnable()
end
function GuidePanel:OnDisable()
end
function GuidePanel:OnDestroy()
end
return GuidePanel