Major Update - 2.0.0.143

EN: 2.0.0.143
CN: 2.0.0.142
JP: 2.0.0.145
KR: 2.0.0.150
This commit is contained in:
SL1900
2026-10-20 13:00:00 +09:00
parent 4bcada6061
commit 08b515afd9
1773 changed files with 1095195 additions and 65670 deletions
@@ -46,8 +46,8 @@ end
function GuideGroup_15:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/btnResource",
Size = {450, 360},
Deviation = {0, 170},
Size = {450, 270},
Deviation = {0, 130},
Head = "Icon/Head/head_11101",
Desc = "Guide_15_1",
DescDeviation = {-800, -40},
@@ -46,7 +46,7 @@ end
function GuideGroup_17:Step_1()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/rtFunctionBg/btnInfinity",
Size = {200, 200},
Size = {210, 186},
Deviation = {0, 0},
Head = "Icon/Head/head_917402",
Desc = "Guide_17_1",
@@ -0,0 +1,151 @@
local GuideGroup_305 = class("GuideGroup_305")
local mapEventConfig = {
[EventId.ClosePanel] = "OnEvent_ClosePanel",
PenguinCard_RunState_Start = "OnEvent_PenguinCardRunStateStart",
PenguinCard_RunState_Prepare = "OnEvent_PenguinCardRunStatePrepare"
}
local groupId = 305
local totalStep = 5
local current = 1
function GuideGroup_305:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_305: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_305: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_305:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_305:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_305:Step_1()
self.msg = {
BindIcon = "PenguinCardSelectPanel/----SafeAreaRoot---/sv/Viewport/LevelContent/goEndlessLevel(Clone)/btnLevel",
ScrollView = "PenguinCardSelectPanel/----SafeAreaRoot---/sv",
Size = {620, 322},
Deviation = {0, 0},
Head = "Icon/Head/head_917401",
Desc = "Guide_305_1",
DescDeviation = {-848, 306},
HandDeviation = {0, 220},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_305:Step_2()
self.msg = {
BindIcon = "PenguinCard_Endless/----SafeAreaRoot----/---Start---/imgBg",
Size = {1290, 425},
Deviation = {0, 32},
Head = "Icon/Head/head_917301",
Desc = "Guide_305_2",
DescDeviation = {0, -316},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_305:Step_3()
self.msg = {
BindIcon = "PenguinCard_Endless/----SafeAreaRoot----/---Start---/imgBg/imgBg2",
Size = {1000, 100},
Deviation = {0, 0},
Head = "Icon/Head/head_917301",
Desc = "Guide_305_3",
DescDeviation = {0, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_305:Step_4()
self.msg = {
BindIcon = "PenguinCard_Endless/----SafeAreaRoot----/---Start---/btnStart1",
Deviation = {0, 0},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_305:Step_5()
self.msg = {
BindIcon = "PenguinCard_Endless/----SafeAreaRoot----/---Prepare---/--Aide--",
Size = {800, 400},
Deviation = {0, 4},
Head = "Icon/Head/head_917301",
Desc = "Guide_305_5",
DescDeviation = {0, -342},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_305:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 1 then
return
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()
end
function GuideGroup_305:OnEvent_PenguinCardRunStateStart()
if current == 1 then
self:Step_2()
end
end
function GuideGroup_305:OnEvent_PenguinCardRunStatePrepare()
if current == 4 then
self:Step_5()
end
end
function GuideGroup_305:OnEvent_ClosePanel(nPanelId)
if type(nPanelId) == "number" and nPanelId == PanelId.PenguinCardEndless and current == 1 then
self.parent:ClearCurGuide(true)
end
end
return GuideGroup_305
@@ -0,0 +1,63 @@
local GuideGroup_501 = class("GuideGroup_501")
local mapEventConfig = {
StoryDialog_DialogEnd = "OnEvent_StoryDialog_DialogEnd",
Guide_Potential_SelectComplete = "OnEvent_Potential_SelectComplete"
}
local groupId = 501
local totalStep = 1
local current = 1
function GuideGroup_501:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_501: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_501: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_501:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_501:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_501:Step_1()
local avgId = "ST_sys_soldier_intro"
current = 1
self.parent:PlayAvg(avgId)
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
end
function GuideGroup_501:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
end
function GuideGroup_501:OnEvent_StoryDialog_DialogEnd()
end
return GuideGroup_501
@@ -0,0 +1,124 @@
local GuideGroup_502 = class("GuideGroup_502")
local mapEventConfig = {
OnEvent_PanelOnEnableById = "OnEvent_PanelOnEnableById"
}
local groupId = 502
local totalStep = 3
local current = 1
function GuideGroup_502:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_502: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_502: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_502:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_502:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_502:Step_1()
self.msg = {
BindIcon = "SoldierMainViewPanel/----SafeAreaRoot---/AnimRoot/btn_Go",
Deviation = {0, 0},
Head = "Icon/Head/head_npc915201",
Desc = "Guide_502_1",
DescDeviation = {-860, 50},
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_502:Step_2()
self.msg = {
BindIcon = "SoldierLevelSelectPanel/----SafeAreaRoot---/AnimRoot/rtList/ScrollView/Viewport/Content/0/imgBg",
Deviation = {0, 0},
Head = "Icon/Head/head_npc915201",
Desc = "Guide_502_2",
DescDeviation = {0, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
self.openPanelId = PanelId.SoldierLevelSelectPanel
self.waitAnimTime = 0.2
current = 2
end
function GuideGroup_502:Step_3()
self.msg = {
BindIcon = "SoldierLevelSelectPanel/----SafeAreaRoot---/AnimRoot/btn_Start",
Deviation = {0, 0},
Head = "Icon/Head/head_npc915201",
Desc = "Guide_502_3",
DescDeviation = {-700, 120},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_502: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
function GuideGroup_502:OnEvent_PanelOnEnableById(_panelId)
if self.openPanelId and self.openPanelId == _panelId and self.waitAnimTime ~= 0 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
local tempRoot = GameObject.Find("---- UI ----").transform
local sv = tempRoot:Find("SoldierLevelSelectPanel/----SafeAreaRoot---/AnimRoot/rtList/ScrollView"):GetComponent("LoopScrollView")
sv:SetScrollPos(0, 0.1)
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
local max = sv:GetMaxUseGridIndex()
self.msg.BindIcon = "SoldierLevelSelectPanel/----SafeAreaRoot---/AnimRoot/rtList/ScrollView/Viewport/Content/" .. max .. "/imgBg"
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
end
return GuideGroup_502
@@ -0,0 +1,136 @@
local GuideGroup_503 = class("GuideGroup_503")
local mapEventConfig = {}
local groupId = 503
local totalStep = 5
local current = 1
function GuideGroup_503:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_503: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_503: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_503:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_503:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_503:Step_1()
self.msg = {
BindIcon = "SoldierBossTemplateSelect/----SafeAreaRoot----",
Deviation = {0, 0},
Desc = "Guide_503_1",
DescDeviation = {0, 0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
self.parent:PlayTypeMask(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_503:Step_2()
self.msg = {
BindIcon = "SoldierBossTemplateSelect/----SafeAreaRoot----/sv_BossTemplate/Viewport/Content/0/btnGrid",
Size = {500, 824},
Deviation = {0, 0},
Desc = "Guide_503_2",
DescDeviation = {800, 450},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_503:Step_3()
self.msg = {
BindIcon = "SoldierBossTemplateSelect/----SafeAreaRoot----/sv_BossTemplate/Viewport/Content/2/btnGrid",
Size = {1512, 824},
Deviation = {0, 0},
Desc = "Guide_503_3",
DescDeviation = {-160, 450},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_503:Step_4()
self.msg = {
BindIcon = "SoldierBossTemplateSelect/----SafeAreaRoot----/sv_BossTemplate/Viewport/Content/0/btnGrid",
Size = {500, 824},
Deviation = {0, 10},
Desc = "Guide_503_4",
DescDeviation = {800, 450},
HandDeviation = {0, 450.0},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_503:Step_5()
self.msg = {
BindIcon = "SoldierBossTemplateSelect/----SafeAreaRoot----/sv_BossTemplate/Viewport/Content/0/btnGrid/AnimRoot/rtBossTemplate/AnimRootMain/btnConfirm",
Size = {300, 100},
Deviation = {0, 0},
Desc = "Guide_503_5",
DescDeviation = {800, 30},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 5
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_503: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_503
@@ -0,0 +1,170 @@
local GuideGroup_504 = class("GuideGroup_504")
local mapEventConfig = {}
local groupId = 504
local totalStep = 9
local current = 1
function GuideGroup_504:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_504: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_504: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_504:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_504:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_504:Step_1()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----",
Deviation = {0, 0},
Desc = "Guide_504_1",
DescDeviation = {0, -180},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_2()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/TopContainer/NodeContainers/NodeLayout",
Size = {674, 100},
Deviation = {0, -50},
Desc = "Guide_504_2",
DescDeviation = {170, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_3()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/TopContainer/NodeContainers/ImageReputationIcon",
Size = {200, 100},
Deviation = {50, 0},
Desc = "Guide_504_3",
DescDeviation = {0, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_4()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ImageWaitingBg",
Size = {1468, 204},
Deviation = {0, 0},
Desc = "Guide_504_4",
DescDeviation = {-210, 300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_5()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/ImgSandboxChess",
Size = {1150, 620},
Deviation = {0, 0},
Desc = "Guide_504_5",
DescDeviation = {350, 400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_6()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/EntranceContainer",
Size = {496, 218},
Deviation = {0, 0},
Desc = "Guide_504_6",
DescDeviation = {120, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_7()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/UpportingContainer",
Size = {1046, 210},
Deviation = {0, 0},
Desc = "Guide_504_7",
DescDeviation = {120, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 7
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_8()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/WaitingContainer/WaitingCardsLayout/WaitingCardItemTemplate1/HaveStatus/SoldierCharacterCardItem/btnItem/AnimRoot/goChar/imgPosition",
Size = {40, 56},
Deviation = {-20, -28},
Desc = "Guide_504_8",
DescDeviation = {570, 190},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 8
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_504:Step_9()
current = 9
local nEntryId = 400902
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, nEntryId)
self.parent:FinishCurrentStep()
end
function GuideGroup_504:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
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()
end
return GuideGroup_504
@@ -0,0 +1,234 @@
local GuideGroup_505 = class("GuideGroup_505")
local mapEventConfig = {
SoldierSandtableCharItemDragStart = "OnEvent_SoldierSandtableCharItemDragStart",
SoldierSandtableCharItemDragEnd = "OnEvent_SoldierSandtableCharItemDragEnd",
Guide_SwapSoldierSuccess = "OnEvent_Guide_SwapSoldierSuccess"
}
local groupId = 505
local totalStep = 6
local current = 1
function GuideGroup_505:Init(parent, runStep)
self.isDragSuccess = false
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_505: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_505: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_505:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
if step == -1 and self.fingerFx ~= nil then
self.fingerFx:SetActive(false)
self.posFx:SetActive(false)
end
end
function GuideGroup_505:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
self.posFx = nil
self.fingerFx = nil
end
function GuideGroup_505:Step_1()
local levelData = PlayerData.SoldierData:GetCurLevelData()
local tabM, tabS, tabO = levelData:GetDeploy()
local nId = 0
for _, v in ipairs(tabS) do
nId = v.nId
break
end
local soldierCharConfig = ConfigTable.GetData("SoldierCharacter", nId)
local tempRoot = GameObject.Find("---- UI ----").transform
local tmpObj = tempRoot:Find("SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/WaitingContainer/WaitingCardsLayout/WaitingCardItemTemplate1/HaveStatus/btn_char").gameObject
tmpObj:SetActive(false)
self.CharType = soldierCharConfig.Type
local tmpDes = ""
self.posFx = ""
self.fingerFx = tempRoot:Find("SoldierSandtablePanel/rtGuide").gameObject
self.fingerFx:SetActive(true)
if soldierCharConfig.Type == GameEnum.ChessType.Balance or soldierCharConfig.Type == GameEnum.ChessType.Vanguard then
tmpDes = "Guide_22_2"
self.posFx = tempRoot:Find("SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/EntranceContainer/EntranceItemTemplate1/ImgGuide").gameObject
self.fingerFx:GetComponent("Animator"):Play("CardGuide_Pos1")
else
tmpDes = "Guide_22_2"
self.posFx = tempRoot:Find("SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/UpportingContainer/UpportingLayout/UpportingItemTemplate1/ImgGuide").gameObject
self.fingerFx:GetComponent("Animator"):Play("CardGuide_Pos2")
end
self.posFx:SetActive(true)
self.parent.GuideUIHelpCS:AddCanvas(self.posFx)
self.parent.GuideUIHelpCS:AddCanvas(self.fingerFx)
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/WaitingContainer/WaitingCardsLayout/WaitingCardItemTemplate1",
Size = {40, 56},
Deviation = {-20, -28},
Desc = "Guide_505_1",
DescDeviation = {800, 800},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.PopPicture
}
self.parent:ActiveHide(true)
current = 1
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
self.parent:PlayTypeMask_505(self.msg)
end
cs_coroutine.start(wait)
end
function GuideGroup_505:Step_2()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/LeftContainer/PartnerList",
Size = {300, 500},
AutoDeviationCenter = true,
Deviation = {120, -240},
Desc = "Guide_505_2",
DescDeviation = {921.0, -379.0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_505:Step_3()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/LeftContainer/PartnerList/PartnerContainer/Viewport/Content/0",
Size = {220, 100},
Deviation = {170, -40},
Desc = "Guide_505_3",
DescDeviation = {920, -140},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_505:Step_4()
self.msg = {
BindIcon = "SoldierPartnerTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg",
Deviation = {0, 0},
Desc = "Guide_505_4",
DescDeviation = {900, 400},
Type = GameEnum.guidetype.Introductory,
isUITop = true,
AutoDeviationTop = true
}
self.parent:ActiveHide(true)
current = 4
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_505:Step_5()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/ImgSandboxChess",
Size = {1150, 620},
Deviation = {0, 0},
Desc = "Guide_505_5",
DescDeviation = {350, 400},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_505:Step_6()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/RightContainer/btnGo",
Deviation = {0, 0},
Desc = "Guide_505_6",
DescDeviation = {-700, 300},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_505:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current == 4 then
EventManager.Hit(EventId.ClosePanel, PanelId.SoldierPartnerTips)
end
if current == totalStep then
self.parent:ClearCurGuide(true)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
function GuideGroup_505:OnEvent_SoldierSandtableCharItemDragStart()
self.parent:ActiveHide(false)
self.parent._mapNode.typeMask:SetActive(false)
self.parent._mapNode.btnCount.gameObject:SetActive(false)
self.fingerFx:SetActive(false)
if self.CharType == GameEnum.ChessType.Balance or self.CharType == GameEnum.ChessType.Vanguard then
EventManager.Hit("Guide_505_EnableDrag", false, AllEnum.SoldierPositionType.Fight)
else
EventManager.Hit("Guide_505_EnableDrag", false, AllEnum.SoldierPositionType.Support)
end
end
function GuideGroup_505:OnEvent_SoldierSandtableCharItemDragEnd()
self.parent:ActiveHide(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
if self.isDragSuccess then
else
self.parent._mapNode.btnCount.gameObject:SetActive(true)
self.parent._mapNode.typeMask:SetActive(true)
self.fingerFx:SetActive(true)
self:Step_1()
end
end
cs_coroutine.start(wait)
end
function GuideGroup_505:OnEvent_Guide_SwapSoldierSuccess()
self.isDragSuccess = true
EventManager.Hit("Guide_505_EnableDrag", true, AllEnum.SoldierPositionType.Other)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
if self.isDragSuccess then
self:SendGuideStep(-1)
self:Step_2()
self.parent.GuideUIHelpCS:RemoveCanvas(self.posFx)
self.posFx:SetActive(false)
self.fingerFx:SetActive(false)
end
end
cs_coroutine.start(wait)
end
return GuideGroup_505
@@ -0,0 +1,173 @@
local GuideGroup_506 = class("GuideGroup_506")
local TimerManager = require("GameCore.Timer.TimerManager")
local mapEventConfig = {}
local groupId = 506
local totalStep = 7
local current = 1
function GuideGroup_506:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_506: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_506: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_506:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_506:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
CS.AdventureModuleHelper.SetGuideLogicTimeScale(1)
end
function GuideGroup_506:Step_1()
CS.AdventureModuleHelper.SetGuideLogicTimeScale(0)
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/btnAutoBattleClose",
Size = {120, 120},
Deviation = {0, 0},
Desc = "Guide_506_1",
DescDeviation = {-410, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_2()
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/btn_speed",
Size = {120, 120},
Deviation = {0, 0},
Desc = "Guide_506_2",
DescDeviation = {-410, -230},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_3()
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/goCharList/goMainChar2",
Size = {420, 180},
Deviation = {0, 0},
Desc = "Guide_506_3",
DescDeviation = {40, 250},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_4()
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/goCharList/goSubChar3",
Size = {840, 180},
Deviation = {70, 0},
Desc = "Guide_506_4",
DescDeviation = {40, 250},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_5()
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/goCharList/goSubChar3",
Size = {840, 180},
Deviation = {70, 0},
Desc = "Guide_506_5",
DescDeviation = {40, 250},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_6()
local levelData = PlayerData.SoldierData:GetCurLevelData()
local tabM, tabS, tabO = levelData:GetDeploy()
local tmpIndex = 0
for _, v in ipairs(tabM) do
if v.nPositionType == GameEnum.SoldierPositionType.FightPosition and v.nId ~= 0 then
tmpIndex = v.nIndex
break
end
end
self.msg = {
BindIcon = "SoldierRoomInfo/----SafeAreaRoot----/goCharList/goMainChar" .. tmpIndex .. "/btnItem",
Size = {140, 180},
Deviation = {0, 0},
Desc = "Guide_506_6",
DescDeviation = {610, 0},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_506:Step_7()
self.msg = {
BindIcon = "SoldierCharCardTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg",
Size = {630, 920},
Deviation = {0, 460},
Desc = "Guide_506_7",
DescDeviation = {-890, 280},
Type = GameEnum.guidetype.Introductory,
isUITop = true
}
self.parent:ActiveHide(true)
current = 7
self.waitAnimTime = 0.3
local wait = function()
self.parent:PlayTypeMask(self.msg)
end
TimerManager.Add(1, self.waitAnimTime, self, wait, true, false, false, nil)
end
function GuideGroup_506:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
if current < totalStep then
self:SendGuideStep(current)
elseif current == totalStep then
self:SendGuideStep(-1)
CS.AdventureModuleHelper.SetGuideLogicTimeScale(1)
self.parent:ClearCurGuide(true)
EventManager.Hit(EventId.ClosePanel, PanelId.SoldierCharCardTips)
return
end
local funName = "Step_" .. current + 1
local func = handler(self, self[funName])
func()
end
return GuideGroup_506
@@ -0,0 +1,276 @@
local GuideGroup_507 = class("GuideGroup_507")
local mapEventConfig = {
Guide_ExperienceLevelChange = "OnEvent_ExperienceLevelChange",
Guide_ExperienceLevelUp_CostNotEnough = "OnEvent_ExperienceLevelUpCostNotEnough"
}
local groupId = 507
local totalStep = 13
local current = 1
function GuideGroup_507:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_507: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_507: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_507:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_507:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_507:Step_1()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ShopContainer/btnShop",
Deviation = {-92, 0},
Desc = "Guide_507_1",
DescDeviation = {-792, 50},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_2()
local index = self:GetShopIndex()
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/Container/rtCardGrid/SoldierCharCardShopItem" .. index,
Deviation = {0, 0},
Desc = "Guide_507_2",
DescDeviation = {0, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_3()
local index = self:GetShopIndex()
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/Container/rtCardGrid/SoldierCharCardShopItem" .. index .. "/btnItem/AnimRoot/Container/Cost",
Deviation = {-32, 20},
Desc = "Guide_507_3",
DescDeviation = {0, -150},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 3
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_4()
local index = self:GetShopIndex()
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/Container/rtCardGrid/SoldierCharCardShopItem" .. index,
Deviation = {0, 0},
Desc = "Guide_507_4",
DescDeviation = {0, -300},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_5()
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/btnLayot/btnRefreshShop",
Deviation = {-120, 0},
Desc = "Guide_507_5",
DescDeviation = {-400, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 5
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_6()
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/goProbabilityBar",
Size = {550, 60},
Deviation = {230, 0},
Desc = "Guide_507_6",
DescDeviation = {250, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 6
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_7()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ExperienceContainer/btnExperience",
Deviation = {0, 0},
Desc = "Guide_507_7",
DescDeviation = {600, 220},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 7
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_8()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ExperienceContainer/btnExperience",
Deviation = {0, 0},
Desc = "Guide_507_8",
DescDeviation = {600, 220},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 8
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_9()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ExperienceContainer/btnExperience",
Deviation = {0, 0},
Desc = "Guide_507_9",
DescDeviation = {600, 220},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 9
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_10()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/TextAddCharCount",
Size = {300, 100},
Deviation = {-50, 0},
Desc = "Guide_507_10",
DescDeviation = {0, -200},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 10
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_11()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/ShopContainer/btnShop",
Deviation = {-92, 0},
Desc = "Guide_507_11",
DescDeviation = {-700, 150},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 11
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_12()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/btn_coinTips",
Deviation = {0, 0},
Desc = "Guide_507_12",
DescDeviation = {-700, 150},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 12
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_507:Step_13()
self.msg = {
BindIcon = "SoldierGoldTipsPanel/----SafeAreaRoot----/Scroll View",
Deviation = {0, 0},
Desc = "Guide_507_13",
DescDeviation = {850, -50},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 13
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_507:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
self.waitAnimTime = 0
if current == 6 then
EventManager.Hit("Guide_CloseSoldierShop")
end
if current == 9 then
return
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()
end
function GuideGroup_507:GetShopIndex()
local levelData = PlayerData.SoldierData:GetCurLevelData()
local shopList = levelData:GetShopData()
local index = 1
local tmpPrice = 0
for i, v in pairs(shopList.tbGoods) do
if tmpPrice < v.Price then
tmpPrice = v.Price
index = i
end
end
return index
end
function GuideGroup_507:OnEvent_ExperienceLevelChange(isChange)
if current == 9 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.2))
if isChange then
self:Step_10()
else
self:Step_9()
end
end
cs_coroutine.start(wait)
end
end
function GuideGroup_507:OnEvent_ExperienceLevelUpCostNotEnough()
if current == 9 then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.1))
self:Step_11()
end
cs_coroutine.start(wait)
end
end
return GuideGroup_507
@@ -0,0 +1,130 @@
local GuideGroup_508 = class("GuideGroup_508")
local mapEventConfig = {}
local groupId = 508
local totalStep = 5
local current = 1
function GuideGroup_508:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_508: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_508: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_508:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_508:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_508:Step_1()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/LeftContainer/PartnerList",
Size = {300, 500},
AutoDeviationCenter = true,
Deviation = {120, -240},
Desc = "Guide_508_1",
DescDeviation = {921.0, -379.0},
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_508:Step_2()
self.msg = {
BindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/LeftContainer/PartnerList/PartnerContainer/Viewport/Content/0",
Size = {220, 100},
Deviation = {170, -40},
Desc = "Guide_508_2",
DescDeviation = {920, -140},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
self.parent:ActiveHide(true)
current = 2
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_508:Step_3()
self.msg = {
BindIcon = "SoldierPartnerTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg/TipsView/Viewport/TipsContent/goPartnerTitle/btnTrace",
Deviation = {-60, 30},
Desc = "Guide_508_3",
DescDeviation = {570, -200},
Type = GameEnum.guidetype.Introductory,
isUITop = true
}
self.parent:ActiveHide(true)
current = 3
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_508:Step_4()
self.msg = {
BindIcon = "SoldierPartnerTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg",
Deviation = {0, 0},
Desc = "Guide_508_4",
DescDeviation = {880, 120},
Type = GameEnum.guidetype.Introductory,
isUITop = true,
AutoDeviationTop = true
}
self.parent:ActiveHide(true)
current = 4
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_508:Step_5()
current = 5
local nEntryId = 400903
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, nEntryId)
self.parent:FinishCurrentStep()
end
function GuideGroup_508: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 == 4 then
EventManager.Hit(EventId.ClosePanel, PanelId.SoldierPartnerTips)
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_508
@@ -0,0 +1,97 @@
local GuideGroup_509 = class("GuideGroup_509")
local mapEventConfig = {}
local groupId = 509
local totalStep = 2
local current = 1
function GuideGroup_509:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_509: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_509: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_509:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_509:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_509:Step_1()
local index = self:GetShopIndex()
local tmpDescDeviation = {300, -400}
if 3 < index then
tmpDescDeviation = {-300, -400}
end
self.msg = {
BindIcon = "SoldierSandtablePanel/SoldierShopComponent/Container/rtCardGrid/SoldierCharCardShopItem" .. index,
Deviation = {0, 0},
Desc = "Guide_509_1",
DescDeviation = tmpDescDeviation,
Type = GameEnum.guidetype.Introductory
}
self.parent:ActiveHide(true)
current = 1
self.parent:PlayTypeMask(self.msg)
end
function GuideGroup_509:Step_2()
current = 2
local nEntryId = 400904
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, nEntryId)
self.parent:FinishCurrentStep()
end
function GuideGroup_509:GetShopIndex()
local tmpId = 1
if PlayerData.SoldierData.tbGuideData[509] ~= nil then
tmpId = PlayerData.SoldierData:GetGuideData(509)
end
local levelData = PlayerData.SoldierData:GetCurLevelData()
local shopList = levelData:GetShopData()
local index = 1
for i, v in pairs(shopList.tbGoods) do
if tmpId == v.Id then
index = i
end
end
return index
end
function GuideGroup_509: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_509
@@ -0,0 +1,156 @@
local GuideGroup_510 = class("GuideGroup_510")
local mapEventConfig = {}
local groupId = 510
local totalStep = 3
local current = 1
function GuideGroup_510:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_510: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_510: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_510:SendGuideStep(step)
local seasonId = PlayerData.SoldierData:GetCurSelectSeasonId()
self.parent:SendGuideStep(groupId, step, AllEnum.GuideType.Soldier, seasonId)
end
function GuideGroup_510:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_510:Step_1()
local index, type = self:GetDeployIndexType()
local tmpBindIcon = ""
if type == 1 then
tmpBindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/EntranceContainer/EntranceItemTemplate" .. index .. "/HaveStatus/btn_char"
elseif type == 2 then
tmpBindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/MiddleContainer/UpportingContainer/UpportingLayout/UpportingItemTemplate" .. index .. "/HaveStatus/btn_char"
else
tmpBindIcon = "SoldierSandtablePanel/----SafeAreaRoot----/DownContainer/WaitingContainer/WaitingCardsLayout/WaitingCardItemTemplate" .. index .. "/HaveStatus/btn_char"
end
local tmpDescDeviation = {600, 220}
if 3 <= index then
tmpDescDeviation = {200, 220}
end
self.msg = {
BindIcon = tmpBindIcon,
Deviation = {0, 0},
Desc = "Guide_510_1",
DescDeviation = tmpDescDeviation,
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
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_510:Step_2()
self.msg = {
BindIcon = "SoldierCharCardTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg/TipsView/Viewport/TipsContent/goBaseInfo",
Size = {600, 300},
Deviation = {0, -350},
Desc = "Guide_510_2",
DescDeviation = {-860, -160},
Type = GameEnum.guidetype.Introductory,
isUITop = true
}
self.parent:ActiveHide(true)
current = 2
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_510:Step_3()
self.msg = {
BindIcon = "SoldierCharCardTipsPanel/----SafeAreaRoot----/rtContent/rtTipsPoint/imgTipsBg/TipsView/Viewport/TipsContent/srDesc",
Size = {600, 300},
Deviation = {0, -250},
Desc = "Guide_510_3",
DescDeviation = {-860, -160},
Type = GameEnum.guidetype.Introductory,
isUITop = true
}
local tempRoot = GameObject.Find("---- UI TOP ----").transform
local objTemp = tempRoot:Find(self.msg.BindIcon .. "/ScrollView"):GetComponent("ScrollRect")
NovaAPI.SetVerticalNormalizedPosition(objTemp, 0)
self.parent:ActiveHide(true)
current = 3
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_510:GetDeployIndexType()
local tmpId = 1
if PlayerData.SoldierData.tbGuideData[510] ~= nil then
tmpId = PlayerData.SoldierData:GetGuideData(510)
end
local levelData = PlayerData.SoldierData:GetCurLevelData()
local tbDeploy, tbWaiting, tbOther = levelData:GetDeploy()
for _, v in ipairs(tbDeploy) do
if v.nPositionType == GameEnum.SoldierPositionType.FightPosition then
if v.nId == tmpId then
return v.nIndex, 1
end
elseif v.nId == tmpId then
return v.nIndex, 2
end
end
for _, v in ipairs(tbDeploy) do
if v.nId == tmpId then
return v.nIndex, 3
end
end
return 1, 1
end
function GuideGroup_510: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_510
@@ -0,0 +1,274 @@
local GuideGroup_521 = class("GuideGroup_521")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_521.nGroupId = 521
GuideGroup_521.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_521.bNeedCheckpoint = true
local nQuestId = 500010
local nDictId = 700101
local sAvgId = "BBm_DormOutdoor"
local sAvgGroupId = "1"
local sHead = "Icon/Head/head_11101"
local CAP = DormGuideUI.InputCap
local nTimelineBlock = CAP.Pan | CAP.Rotate | CAP.Zoom | CAP.Move | CAP.PickActor | CAP.PickFur
local nNoMoveBlock = DormGuideUI.DEFAULT_BLOCK | CAP.Move
local Policy = function(nCap, bHide, bQuest, bBarrier)
return {
nSceneCap = nCap,
bUiBarrier = bBarrier ~= false,
bLockLeave = true,
bHideChrome = bHide == true,
bLockQuest = bQuest == true
}
end
function GuideGroup_521:OnStart(ctx)
if NovaAPI.GetCurrentModuleName() == "DormModuleScene" then
print("[DormGuide] 521 abort, already in dorm")
ctx:Set("bAbort", true)
else
PlayerData.PlayerDormData:SetEnterDormParam(nil, true)
ctx:Set("nEnterGen", DormGuideAdapter.BeginDormEnter())
end
end
function GuideGroup_521:OnClear()
EventManager.Hit(EventId.AvgBubbleExit)
PlayerData.PlayerDormData:SetEnterDormParam(nil, false)
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_521:GetSteps()
return {
{
sName = "dorm_entry",
bPlayerWait = true,
ShouldRun = function(ctx)
if ctx:Get("bAbort") then
return "abort"
end
return "run"
end,
Poll = function()
local goRoot = GameObject.Find("---- UI ----")
if goRoot == nil then
return nil
end
return goRoot.transform:Find("MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnDorm")
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {200, 200},
Deviation = {0, 0},
Desc = "Guide_521_1",
DescDeviation = {-650, 0},
HandDeviation = {0, 180},
HandRotation = 180
}
},
InputPolicy = Policy(0, false, false, true),
Action = function()
local goRoot = GameObject.Find("---- UI ----")
if goRoot == nil then
return {sState = "rejected"}
end
local tr = goRoot.transform:Find("MainViewPanel/----SafeAreaRoot----/HideRoot/--BottomRight--/btnDorm")
if tr == nil then
return {sState = "rejected"}
end
local btn = tr:GetComponent("UIButton")
if btn ~= nil and btn.onClick ~= nil then
btn.onClick:Invoke()
end
return {sState = "accepted"}
end,
End = {sMode = "Click"},
OnExit = function(_, sReason)
if sReason ~= "success" then
return
end
DormGuideAdapter.ApplyPolicy(Policy(nTimelineBlock, true, false, true))
end
},
{
sName = "outdoor_avg",
bPlayerWait = true,
Start = {
Events = {
"DORM_CS2LUA_BORN_TIMELINE_DONE"
},
Match = function(ctx, bSuccess)
ctx:Set("bCameraDone", true)
ctx:Set("bCameraOk", bSuccess == true)
return true
end,
Ready = function(ctx)
if ctx:Get("bCameraDone") == true then
return true
end
return DormGuideAdapter.TimelineState(ctx:Get("nEnterGen")) ~= nil
end,
Timeout = 20
},
Present = {
sKind = "Avg",
sAvgId = sAvgId,
sAvgGroup = sAvgGroupId
},
InputPolicy = Policy(DormGuideUI.DEFAULT_BLOCK, true, false, false),
End = {
sMode = "Condition",
Ready = function()
return false
end
}
},
{
sName = "dict",
bPlayerWait = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = Policy(nNoMoveBlock, true, false, false),
End = {
sMode = "Condition",
Ready = function()
return false
end
},
OnExit = function(_, sReason)
if sReason ~= "success" then
return
end
DormGuideAdapter.ApplyPolicy(Policy(nNoMoveBlock, false, true, true))
end
},
{
sName = "quest_card",
bPlayerWait = true,
Poll = function()
return DormGuideAdapter.GetQuestCardTransform()
end,
Present = {
sKind = "Mask",
mapMask = {
Desc = "Guide_521_5",
DescDeviation = {800, 0},
HandDeviation = {0, -150},
HandRotation = 0
},
Ready = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
return DormGuideAdapter.QuestCardSettled()
end
},
InputPolicy = Policy(nNoMoveBlock, false, true, true),
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Quest) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_Quest()
return {sState = "accepted"}
end,
End = {
sMode = "Condition",
Events = {
"OnEvent_PanelOnEnableById"
},
Ready = function()
local PanelManager = require("GameCore.UI.PanelManager")
return PanelManager.CheckPanelOpen(PanelId.DormQuestPanel)
end,
Timeout = 999
}
},
{
sName = "receive",
nSystemTimeout = 3,
bReportDone = true,
ShouldRun = function()
local PanelManager = require("GameCore.UI.PanelManager")
if not PanelManager.CheckPanelOpen(PanelId.DormQuestPanel) then
return "run"
end
if DormGuideAdapter.QuestStatus(nQuestId) == 2 then
return "finish"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.QuestStatus(nQuestId) == 1
end,
Timeout = 999
},
Poll = function()
local obj = DormGuideUI._GetOverlay("quest")
if obj == nil or obj._mapCtrl == nil then
return nil
end
for _, objGrid in pairs(obj._mapCtrl) do
if objGrid.mapDormQuest ~= nil and objGrid.mapDormQuest.nTid == nQuestId and objGrid._mapNode ~= nil and objGrid._mapNode.btnReceive ~= nil then
return objGrid._mapNode.btnReceive.transform
end
end
return nil
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {200, 120},
Deviation = {0, 0},
HandDeviation = {0, 110},
HandRotation = 180
},
Ready = function()
local obj = DormGuideUI._GetOverlay("quest")
return obj ~= nil and type(obj.IsGuideEnterDone) == "function" and obj:IsGuideEnterDone()
end,
Timeout = 999
},
InputPolicy = {
enter = Policy(nNoMoveBlock, false, true, true),
click = Policy(nNoMoveBlock, false, true, true),
request = {
nSceneCap = nNoMoveBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = false,
bLockQuest = true
}
},
Action = function(ctx)
local nId, bNew = DormGuideAdapter.BeginQuest(nQuestId)
ctx:Set("nQuestOp", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
local obj = DormGuideUI._GetOverlay("quest")
if obj == nil then
return {sState = "rejected", nOpId = nId}
end
obj:OnEvent_GridRecieveClick(nQuestId)
local sPhase = DormGuideAdapter.QuestPhase(nId)
if sPhase == "done" then
return {sState = "done", nOpId = nId}
end
if sPhase == "rejected" then
return {sState = "rejected", nOpId = nId}
end
return {sState = "pending", nOpId = nId}
end,
End = {
sMode = "Event",
Events = {
"DormGuide_QuestReceive"
},
Ready = function(ctx)
return DormGuideAdapter.QuestPhase(ctx:Get("nQuestOp")) == "done"
end,
Timeout = 999
}
}
}
end
return GuideGroup_521
@@ -0,0 +1,806 @@
local GuideGroup_522 = class("GuideGroup_522")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_522.nGroupId = 522
GuideGroup_522.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_522.bNeedCheckpoint = true
local nFur = 700003
local nQuestId = 500011
local nDictId = 700102
local sHead = "Icon/Head/head_11201"
local CAP = DormGuideUI.InputCap
local nMoveBlock = DormGuideUI.DEFAULT_BLOCK | CAP.Move
local Policy = function(bHide, bQuest)
return {
nSceneCap = nMoveBlock,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = bHide == true,
bLockQuest = bQuest == true
}
end
local FurnitureListSettled = function()
local obj = DormGuideAdapter._Editor()
if obj == nil or obj._mapNode == nil then
return false
end
return DormGuideAdapter.AnimatorSettled(obj._mapNode.rtFurnitureBgAnim, "FurnitureList_in")
end
function GuideGroup_522:OnStart()
end
function GuideGroup_522:OnClear()
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_522:GetSteps()
return {
{
sName = "editor",
bPlayerWait = true,
ShouldRun = function()
if DormGuideAdapter.QuestStatus(nQuestId) == 2 then
return "finish"
end
local sState = DormGuideAdapter.FurnitureState(nFur)
local nMode = DormGuideAdapter.Mode()
if sState == "saved" and nMode ~= 2 and DormGuideAdapter.HasPendingSave() ~= true then
return "skip"
end
if nMode == 2 then
return "skip"
end
return "run"
end,
Poll = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnEditor)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 180},
Deviation = {0, -10},
Head = "Icon/Head/head_11101",
Desc = "Guide_522_1",
DescDeviation = {-700, 0},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
},
InputPolicy = Policy(false, false),
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_EditMode) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_EditMode()
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "editor_ready",
nSystemTimeout = 3,
ShouldRun = function()
local sState = DormGuideAdapter.FurnitureState(nFur)
local nMode = DormGuideAdapter.Mode()
if sState == "saved" and nMode ~= 2 and DormGuideAdapter.HasPendingSave() ~= true then
return "skip"
end
if sState == "unknown" then
return "run"
end
if sState == "saved" or sState == "editing" then
return "run"
end
local bCan = DormGuideAdapter.CanPlace(nFur)
if bCan == nil then
return "run"
end
local sTab = DormGuideAdapter.ResolveTab(nFur)
if sTab == "missing" and bCan ~= true and sState == "none" then
return "abort"
end
if sState == "none" and bCan ~= true and sTab ~= "unknown" then
return "abort"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.EditorReady(nFur) and FurnitureListSettled()
end,
Events = {
"DormGuide_ModeApplied"
},
Timeout = 300
},
OnEnter = function(ctx)
local sTab, nMain, nSub = DormGuideAdapter.ResolveTab(nFur)
if sTab == "ok" then
ctx:Set("nMainTab", nMain)
ctx:Set("nSubIdx", nSub)
end
DormGuideAdapter.ResetExitEditor()
end,
Present = {sKind = "None"},
InputPolicy = Policy(false, false),
End = {
sMode = "Condition",
Ready = function(ctx)
if not FurnitureListSettled() then
return false
end
local sTab, nMain, nSub = DormGuideAdapter.ResolveTab(nFur)
if sTab ~= "ok" then
return false
end
ctx:Set("nMainTab", nMain)
ctx:Set("nSubIdx", nSub)
return true
end,
Timeout = 300
}
},
{
sName = "main_tab",
bPlayerWait = true,
ShouldRun = function(ctx)
local sState = DormGuideAdapter.FurnitureState(nFur)
if sState == "saved" or sState == "editing" then
return "skip"
end
local sTab, nMain = DormGuideAdapter.ResolveTab(nFur)
if sTab == "unknown" then
return "run"
end
if sTab ~= "ok" then
return "abort"
end
ctx:Set("nMainTab", nMain)
local obj = DormGuideAdapter._Editor()
if obj ~= nil and obj.nCurMainTab == nMain then
return "skip"
end
return "run"
end,
Poll = function(ctx)
local obj = DormGuideAdapter._Editor()
local nMain = ctx:Get("nMainTab")
if obj == nil or obj._mapNode == nil or obj._mapNode.listTog == nil or nMain == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.listTog[nMain])
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {150, 150},
Deviation = {10, 0},
Head = sHead,
HandDeviation = {0, 80},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
}
},
InputPolicy = Policy(false, false),
Action = function(ctx)
local obj = DormGuideAdapter._Editor()
local nMain = ctx:Get("nMainTab")
if obj == nil or nMain == nil or type(obj.OnBtnClick_MainTabTog) ~= "function" then
return {sState = "rejected"}
end
if obj.nCurMainTab ~= nMain then
obj:OnBtnClick_MainTabTog(nil, nMain)
end
if obj.nCurMainTab ~= nMain then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "sub_tab",
bPlayerWait = true,
ShouldRun = function(ctx)
local sState = DormGuideAdapter.FurnitureState(nFur)
if sState == "saved" or sState == "editing" then
return "skip"
end
local sTab, nMain, nSub = DormGuideAdapter.ResolveTab(nFur)
if sTab == "unknown" then
return "run"
end
if sTab ~= "ok" then
return "abort"
end
ctx:Set("nMainTab", nMain)
ctx:Set("nSubIdx", nSub)
return "run"
end,
WaitTrigger = {
Ready = function(ctx)
local obj = DormGuideAdapter._Editor()
local nMain = ctx:Get("nMainTab")
return obj ~= nil and nMain ~= nil and obj.nCurMainTab == nMain and obj.nGuideListVer ~= nil
end,
Timeout = 300
},
Poll = function(ctx)
local obj = DormGuideAdapter._Editor()
local nSub = ctx:Get("nSubIdx")
if obj == nil or obj._mapNode == nil or obj._mapNode.furnitureListTog == nil or nSub == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.furnitureListTog[nSub])
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {150, 150},
Deviation = {-5, -5},
Head = sHead,
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
},
Ready = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
return FurnitureListSettled()
end
},
InputPolicy = Policy(false, false),
Action = function(ctx)
local obj = DormGuideAdapter._Editor()
local nSub = ctx:Get("nSubIdx")
if obj == nil or nSub == nil or type(obj.OnBtnClick_FurnitureTabTog) ~= "function" then
return {sState = "rejected"}
end
local nMain = ctx:Get("nMainTab")
local nCurSub = nMain == 1 and obj.nCurFurniturTab1 or obj.nCurFurniturTab2
if obj.nCurMainTab ~= nMain or nCurSub ~= nSub then
obj:OnBtnClick_FurnitureTabTog(nil, nSub)
end
nCurSub = nMain == 1 and obj.nCurFurniturTab1 or obj.nCurFurniturTab2
if nCurSub ~= nSub then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "furniture",
bPlayerWait = true,
ShouldRun = function()
local sState = DormGuideAdapter.FurnitureState(nFur)
if sState == "saved" or sState == "editing" then
return "skip"
end
return "run"
end,
Prepare = {
Ready = function(ctx)
local obj = DormGuideAdapter._Editor()
local nMain = ctx:Get("nMainTab")
local nSub = ctx:Get("nSubIdx")
if obj == nil or nMain == nil or nSub == nil or obj.nGuideListVer == nil then
return false
end
if obj.nCurMainTab ~= nMain then
return false
end
local nCurSub = nMain == 1 and obj.nCurFurniturTab1 or obj.nCurFurniturTab2
return nCurSub == nSub
end,
Run = function()
return DormGuideUI.PositionFurniture(nFur) == true
end,
Version = function()
local obj = DormGuideAdapter._Editor()
return obj ~= nil and obj.nGuideListVer or nil
end,
Timeout = 300
},
WaitTrigger = {
Ready = function()
local obj = DormGuideAdapter._Editor()
return obj ~= nil and obj.nGuideListVer ~= nil and DormGuideUI.GetFurnitureListIndex(nFur) ~= nil
end,
Timeout = 300
},
Poll = function()
local _, mapCtrl = DormGuideUI._GetFurnitureCtrl(nFur)
if mapCtrl == nil then
return nil
end
if mapCtrl._mapNode ~= nil and mapCtrl._mapNode.rtContent ~= nil then
return mapCtrl._mapNode.rtContent.transform
end
if mapCtrl.gameObject ~= nil then
return mapCtrl.gameObject.transform
end
return nil
end,
CacheId = function(_, tr)
local objEditor = DormGuideAdapter._Editor()
local nVer = 0
if objEditor ~= nil and objEditor.nGuideListVer ~= nil then
nVer = objEditor.nGuideListVer
end
return {
nFur = nFur,
nInst = tr.gameObject:GetInstanceID(),
nVer = nVer
}
end,
CacheValid = function(_, tr, mapId)
if mapId == nil or tr == nil or tr.gameObject == nil then
return false
end
if tr.gameObject:GetInstanceID() ~= mapId.nInst then
return false
end
local _, mapCtrl = DormGuideUI._GetFurnitureCtrl(nFur)
if mapCtrl == nil then
return false
end
if mapCtrl._mapNode ~= nil and mapCtrl._mapNode.rtContent ~= nil then
return tr.gameObject:GetInstanceID() == mapCtrl._mapNode.rtContent.gameObject:GetInstanceID()
end
return tr.gameObject:GetInstanceID() == mapCtrl.gameObject:GetInstanceID()
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 180},
Deviation = {0, 0},
Head = sHead,
Desc = "Guide_522_4",
DescDeviation = {700, 10},
HandDeviation = {0, 150},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
},
Ready = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
return FurnitureListSettled()
end,
Timeout = 300
},
InputPolicy = Policy(false, false),
Action = function()
local obj, mapCtrl = DormGuideUI._GetFurnitureCtrl(nFur)
local nIdx = DormGuideUI.GetFurnitureListIndex(nFur)
local objPanel = DormGuideAdapter._Panel()
if obj == nil or mapCtrl == nil or nIdx == nil or objPanel == nil then
return {sState = "rejected"}
end
local nBefore = objPanel.tempEditCount[nFur] or 0
obj:OnFurnitureBtnClickGrid(mapCtrl.gameObject, nIdx - 1)
local nAfter = objPanel.tempEditCount[nFur] or 0
if obj.nCurEditFurniture ~= nFur or nBefore >= nAfter then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "hud",
bPlayerWait = true,
ShouldRun = function()
local obj = DormGuideAdapter._Editor()
if obj ~= nil and obj.nCurEditFurniture == nFur then
return "run"
end
local sState = DormGuideAdapter.FurnitureState(nFur)
if sState == "saved" or sState == "editing" then
return "skip"
end
return "run"
end,
WaitTrigger = {
Ready = function()
local obj = DormGuideAdapter._Editor()
return obj ~= nil and obj.nCurEditFurniture == nFur and obj._mapNode ~= nil and (obj._mapNode.btnHudCancel ~= nil or obj._mapNode.btnHudConfirm ~= nil)
end,
Events = {
"DORM_CS_SWITCH_FURNITURE"
},
Timeout = 300
},
Poll = function()
local obj = DormGuideAdapter._Editor()
if obj == nil or obj._mapNode == nil then
return nil
end
local node = obj._mapNode.btnHudCancel or obj._mapNode.btnHudConfirm
return DormGuideAdapter.NodeTr(node)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {120, 120},
Deviation = {0, 5},
Head = sHead,
Desc = "Guide_522_5",
DescDeviation = {0, -200},
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
},
Show = function(_, tr)
if tr ~= nil then
tr.gameObject:SetActive(true)
end
end,
Ready = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
local obj = DormGuideAdapter._Editor()
if obj == nil or obj._mapNode == nil then
return false
end
return DormGuideAdapter.AnimatorSettled(obj._mapNode.animHud, "RoomEditorbtn_in")
end
},
InputPolicy = Policy(false, false),
Action = function()
local obj = DormGuideAdapter._Editor()
if obj == nil or type(obj.OnBtnClick_ExitEditor) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_ExitEditor()
if obj.nCurEditFurniture ~= 0 then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "save",
nSystemTimeout = 3,
bReportDone = true,
bReportOnSkip = true,
ShouldRun = function()
local sState = DormGuideAdapter.FurnitureState(nFur)
if sState == "unknown" then
return "run"
end
if sState == "saved" and DormGuideAdapter.HasPendingSave() == false then
return "skip"
end
return "run"
end,
Poll = function()
local obj = DormGuideAdapter._Editor()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnSaveRoom)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {480, 140},
Deviation = {0, 0},
Desc = "Guide_522_6",
DescDeviation = {-800, -100},
HandDeviation = {0, -120},
HandRotation = 0,
Type = GameEnum.guidetype.ForcedClick
},
Show = function(_, tr)
if tr ~= nil then
tr.gameObject:SetActive(true)
end
end
},
InputPolicy = {
enter = Policy(false, false),
click = Policy(false, false),
request = Policy(false, false)
},
Action = function(ctx)
local nId, bNew = DormGuideAdapter.BeginSave()
ctx:Set("nSaveId", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
local obj = DormGuideAdapter._Editor()
if obj == nil or type(obj.OnBtnClick_SaveRoom) ~= "function" then
return {sState = "rejected", nOpId = nId}
end
obj:OnBtnClick_SaveRoom()
local sPhase = DormGuideAdapter.SavePhase(nId)
if sPhase == "rejected" then
return {sState = "rejected", nOpId = nId}
end
if sPhase == "done" then
return {sState = "done", nOpId = nId}
end
return {sState = "pending", nOpId = nId}
end,
End = {
sMode = "Event",
Events = {
"DormGuide_SaveResult"
},
Ready = function(ctx)
return DormGuideAdapter.SavePhase(ctx:Get("nSaveId")) == "done"
end,
Timeout = 300
}
},
{
sName = "save_exit",
nSystemTimeout = 3,
Prepare = {
Ready = function()
return DormGuideAdapter.Mode() ~= nil
end,
Run = function(ctx)
if DormGuideAdapter.Mode() ~= 2 then
return true
end
if DormGuideAdapter.SaveCutscenePlaying(ctx:Get("nSaveId")) then
return false
end
return DormGuideAdapter.ExitEditorOnce()
end,
Events = {
"DormGuide_SaveCutsceneEnd",
"DormPanel_BtnInteractive"
},
Timeout = 20
},
WaitTrigger = {
Ready = function(ctx)
local nMode = DormGuideAdapter.Mode()
if nMode ~= 0 and nMode ~= 1 then
return false
end
local nSave = ctx:Get("nSaveId")
if nSave == nil then
return true
end
return DormGuideAdapter.SaveSettled(nSave)
end,
Events = {
"DormGuide_SaveCutsceneEnd",
"DormGuide_ModeApplied",
"DormPanel_BtnInteractive"
},
Interval = 0,
Timeout = 300
},
Present = {sKind = "None"},
InputPolicy = {
nSceneCap = nMoveBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function(ctx)
local nMode = DormGuideAdapter.Mode()
if nMode ~= 0 and nMode ~= 1 then
return false
end
local nSave = ctx:Get("nSaveId")
if nSave == nil then
return true
end
return DormGuideAdapter.SaveSettled(nSave)
end,
Timeout = 300
},
OnExit = function(_, sReason)
if sReason ~= "success" and sReason ~= "skip" then
return
end
DormGuideAdapter.ApplyPolicy({
nSceneCap = nMoveBlock,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false,
bLockQuest = true
})
end
},
{
sName = "dict",
bPlayerWait = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
nSceneCap = nMoveBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true
},
End = {
sMode = "Condition",
Ready = function()
return false
end
},
OnExit = function(_, sReason)
if sReason ~= "success" and sReason ~= "skip" then
return
end
DormGuideAdapter.ApplyPolicy({
nSceneCap = nMoveBlock,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false,
bLockQuest = true
})
end
},
{
sName = "quest_card",
bPlayerWait = true,
Find = {Timeout = 300},
ShouldRun = function()
if DormGuideAdapter.QuestStatus(nQuestId) == 2 then
return "finish"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.QuestStatus(nQuestId) ~= nil
end,
Timeout = 300
},
Poll = function()
return DormGuideAdapter.GetQuestCardTransform()
end,
Present = {
sKind = "Mask",
mapMask = {
Head = sHead,
HandDeviation = {0, 120},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
},
Ready = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
return DormGuideAdapter.QuestCardSettled()
end,
Timeout = 300
},
InputPolicy = Policy(false, true),
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Quest) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_Quest()
return {sState = "accepted"}
end,
End = {
sMode = "Condition",
Events = {
"OnEvent_PanelOnEnableById"
},
Ready = function()
local PanelManager = require("GameCore.UI.PanelManager")
return PanelManager.CheckPanelOpen(PanelId.DormQuestPanel)
end,
Timeout = 300
}
},
{
sName = "receive",
nSystemTimeout = 3,
ShouldRun = function()
local PanelManager = require("GameCore.UI.PanelManager")
if not PanelManager.CheckPanelOpen(PanelId.DormQuestPanel) then
return "run"
end
local nStatus = DormGuideAdapter.QuestStatus(nQuestId)
if nStatus == nil then
return "run"
end
if nStatus == 2 then
return "finish"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.QuestStatus(nQuestId) == 1
end,
Timeout = 300
},
Poll = function()
local obj = DormGuideUI._GetOverlay("quest")
if obj == nil or obj._mapCtrl == nil then
return nil
end
for _, objGrid in pairs(obj._mapCtrl) do
if objGrid.mapDormQuest ~= nil and objGrid.mapDormQuest.nTid == nQuestId and objGrid._mapNode ~= nil and objGrid._mapNode.btnReceive ~= nil then
return objGrid._mapNode.btnReceive.transform
end
end
return nil
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {200, 120},
Deviation = {0, 0},
Head = sHead,
HandDeviation = {0, 80},
HandRotation = 180,
Type = GameEnum.guidetype.ForcedClick
},
Ready = function()
local obj = DormGuideUI._GetOverlay("quest")
return obj ~= nil and type(obj.IsGuideEnterDone) == "function" and obj:IsGuideEnterDone()
end,
Timeout = 300
},
InputPolicy = {
enter = Policy(false, true),
click = Policy(false, true),
request = {
nSceneCap = nMoveBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = false,
bLockQuest = true
}
},
Action = function(ctx)
local nId, bNew = DormGuideAdapter.BeginQuest(nQuestId)
ctx:Set("nQuestOp", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
local obj = DormGuideUI._GetOverlay("quest")
if obj == nil or type(obj.OnEvent_GridRecieveClick) ~= "function" then
return {sState = "rejected", nOpId = nId}
end
obj:OnEvent_GridRecieveClick(nQuestId)
local sPhase = DormGuideAdapter.QuestPhase(nId)
if sPhase == "done" then
return {sState = "done", nOpId = nId}
end
if sPhase == "rejected" then
return {sState = "rejected", nOpId = nId}
end
return {sState = "pending", nOpId = nId}
end,
End = {
sMode = "Event",
Events = {
"DormGuide_QuestReceive"
},
Ready = function(ctx)
if DormGuideAdapter.QuestPhase(ctx:Get("nQuestOp")) == "done" then
return true
end
return DormGuideAdapter.QuestStatus(nQuestId) == 2 and DormGuideAdapter.QuestPhase(ctx:Get("nQuestOp")) ~= "pending"
end,
Timeout = 300
}
}
}
end
return GuideGroup_522
@@ -0,0 +1,156 @@
local GuideGroup_523 = class("GuideGroup_523")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_523.nGroupId = 523
GuideGroup_523.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_523.bNeedCheckpoint = true
local nDictId = 700103
local sHead = "Icon/Head/head_11101"
function GuideGroup_523:OnStart()
end
function GuideGroup_523:OnClear()
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_523:GetSteps()
return {
{
sName = "gift",
nSystemTimeout = 3,
bReportDone = true,
bReportOnSkip = true,
ShouldRun = function()
local bGift = DormGuideAdapter.GiftState()
if bGift == nil then
return "run"
end
if bGift ~= true then
return "skip"
end
return "run"
end,
OnEnter = function()
DormGuideAdapter.ApplyPolicy({
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false,
tbShowExcept = {rtGiftHint = true}
})
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.GiftState() == true
end,
Timeout = 300
},
Poll = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.rtGiftHint)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 210},
Deviation = {0, 0},
Head = "Icon/Head/head_10301",
Desc = "Guide_523_1",
DescDeviation = {0, -200},
HandDeviation = {0, 150},
HandRotation = 180
},
Show = function(_, tr)
if tr ~= nil then
tr.gameObject:SetActive(true)
end
end
},
InputPolicy = {
enter = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false,
tbShowExcept = {rtGiftHint = true}
},
click = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false,
tbShowExcept = {rtGiftHint = true}
},
request = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = false
}
},
Action = function(ctx)
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_ReceiveDormReward) ~= "function" then
return {sState = "rejected"}
end
if DormGuideAdapter.GiftState() ~= true then
return {sState = "rejected"}
end
local nId, bNew = DormGuideAdapter.BeginQuest(0)
ctx:Set("nGiftOp", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
obj:OnBtnClick_ReceiveDormReward()
return {sState = "pending", nOpId = nId}
end,
End = {
sMode = "Event",
Events = {
"DormGuide_QuestReceive",
"Guide_CloseDisposablePanel"
},
Ready = function(ctx)
if DormGuideAdapter.QuestPhase(ctx:Get("nGiftOp")) ~= "done" then
return false
end
if DormGuideAdapter.GiftState() ~= false then
return false
end
local PanelManager = require("GameCore.UI.PanelManager")
if PanelManager.CheckPanelOpen(PanelId.ReceivePropsTips) or PanelManager.CheckPanelOpen(PanelId.ReceivePropsNPC) or PanelManager.CheckPanelOpen(PanelId.ReceiveSpecialReward) or PanelManager.CheckPanelOpen(PanelId.ReceiveAutoTrans) then
return false
end
return true
end,
Timeout = 300
},
OnExit = function()
DormGuideAdapter.ApplyPolicy({
bLockLeave = false,
bHideChrome = false,
tbShowExcept = nil
})
end
},
{
sName = "dict",
bPlayerWait = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = false,
bLockLeave = false,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
}
}
end
return GuideGroup_523
@@ -0,0 +1,492 @@
local GuideGroup_524 = class("GuideGroup_524")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_524.nGroupId = 524
GuideGroup_524.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_524.bNeedCheckpoint = true
local nRoleId = 103
local nDictId = 700104
local sHead = "Icon/Head/head_11101"
local CAP = DormGuideUI.InputCap
local nApproachCap = CAP.Zoom | CAP.PickFur
local nCaressCap = CAP.Zoom | CAP.Move | CAP.PickFur
local SelectOpen = function()
local obj = DormGuideAdapter._Select()
return obj ~= nil and obj.bOpen == true
end
local RoomFullWithoutRole = function()
if DormGuideAdapter.RoleInRoom(nRoleId) ~= false then
return false
end
local objPanel = DormGuideAdapter._Panel()
if objPanel == nil or objPanel.nCurRoom == nil or objPanel.mapDormRoomInfo == nil then
return false
end
local mapRoom = objPanel.mapDormRoomInfo[objPanel.nCurRoom]
if mapRoom == nil or mapRoom.RoleList == nil then
return false
end
local mapCfg = ConfigTable.GetData("DormRoom", objPanel.nCurRoom)
if mapCfg == nil or mapCfg.RoleNum == nil or mapCfg.RoleNum <= 0 then
return false
end
return #mapRoom.RoleList >= mapCfg.RoleNum
end
function GuideGroup_524:OnStart()
end
function GuideGroup_524:OnClear()
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_524:GetSteps()
return {
{
sName = "char_btn",
bPlayerWait = true,
ShouldRun = function()
if RoomFullWithoutRole() then
return "finish"
end
if SelectOpen() then
return "skip"
end
return "run"
end,
Poll = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnCharacter)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 180},
Deviation = {0, -10},
Desc = "Guide_524_1",
DescDeviation = {-700, -10},
Head = sHead,
HandDeviation = {0, 80},
HandRotation = 180
}
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
},
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Character) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_Character()
if not SelectOpen() then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "pick",
bPlayerWait = true,
ShouldRun = function()
local obj = DormGuideAdapter._Select()
if obj ~= nil and obj.curChar ~= nil and table.indexof(obj.curChar, nRoleId) > 0 then
return "skip"
end
if not SelectOpen() then
if RoomFullWithoutRole() then
return "finish"
end
return "run"
end
if obj.tbCharInRoom ~= nil and obj.tbCharInRoom[nRoleId] ~= nil then
return "abort"
end
if obj.tbSortedChar ~= nil and 0 < #obj.tbSortedChar and 0 >= table.indexof(obj.tbSortedChar, nRoleId) then
return "abort"
end
if obj.curChar ~= nil and table.indexof(obj.curChar, 0) <= 0 and table.indexof(obj.curChar, nRoleId) <= 0 then
return "finish"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return SelectOpen()
end,
Timeout = 300
},
Prepare = {
Ready = function()
return SelectOpen()
end,
Run = function()
return DormGuideUI.PrepareCharSelect(nRoleId) == true
end,
Version = function()
local obj = DormGuideAdapter._Select()
return obj ~= nil and obj.nGuideOpenVer or nil
end,
Timeout = 300
},
Poll = function()
local obj = DormGuideAdapter._Select()
if obj == nil or obj.mapGridCtrl == nil then
return nil
end
for _, mapCtrl in pairs(obj.mapGridCtrl) do
if mapCtrl.nCharId == nRoleId and mapCtrl._mapNode ~= nil and mapCtrl._mapNode.btnGrid ~= nil then
return mapCtrl._mapNode.btnGrid.transform
end
end
return nil
end,
CacheId = function(_, tr)
return {
nRole = nRoleId,
nInst = tr.gameObject:GetInstanceID()
}
end,
CacheValid = function(_, tr, mapId)
local obj = DormGuideAdapter._Select()
if obj == nil or obj.mapGridCtrl == nil or tr == nil or tr.gameObject == nil or mapId == nil then
return false
end
for _, mapCtrl in pairs(obj.mapGridCtrl) do
if mapCtrl.nCharId == nRoleId and mapCtrl._mapNode ~= nil and mapCtrl._mapNode.btnGrid ~= nil then
return mapCtrl._mapNode.btnGrid.gameObject:GetInstanceID() == mapId.nInst
end
end
return false
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {200, 200},
Deviation = {0, 0},
Desc = "Guide_524_2",
DescDeviation = {-700, 0},
Head = sHead,
HandDeviation = {0, 150},
HandRotation = 180
}
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
Action = function()
local obj = DormGuideAdapter._Select()
if obj == nil or obj.tbSortedChar == nil or type(obj.OnGridBtnClick) ~= "function" then
return {sState = "rejected"}
end
if table.indexof(obj.curChar, nRoleId) > 0 then
return {sState = "accepted"}
end
local nIdx = table.indexof(obj.tbSortedChar, nRoleId)
if nIdx == nil or nIdx <= 0 then
return {sState = "rejected"}
end
local go
for _, mapCtrl in pairs(obj.mapGridCtrl) do
if mapCtrl.nCharId == nRoleId then
go = mapCtrl.gameObject
break
end
end
if go == nil then
return {sState = "rejected"}
end
obj:OnGridBtnClick(go, nIdx - 1)
if table.indexof(obj.curChar, nRoleId) <= 0 then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "confirm",
nSystemTimeout = 3,
ShouldRun = function()
if not SelectOpen() and DormGuideAdapter.RoleInRoom(nRoleId) == true then
local nMode = DormGuideAdapter.Mode()
if nMode == 0 or nMode == 1 then
return "skip"
end
end
return "run"
end,
Poll = function()
local obj = DormGuideAdapter._Select()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnConfirm)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {330, 120},
Deviation = {0, 5},
HandDeviation = {0, 80},
HandRotation = 180
},
Ready = function()
local obj = DormGuideAdapter._Select()
if obj == nil then
return false
end
return DormGuideAdapter.AnimatorSettled(obj.animator, "LiveTogether_in")
end,
Timeout = 300
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
Action = function(ctx)
local nId, bNew = DormGuideAdapter.BeginCharConfirm()
ctx:Set("nCharOp", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
local obj = DormGuideAdapter._Select()
if obj == nil or type(obj.OnBtnClick_Confirm) ~= "function" then
return {sState = "rejected", nOpId = nId}
end
obj:OnBtnClick_Confirm()
return {sState = "pending", nOpId = nId}
end,
End = {
sMode = "Event",
Events = {
"DormGuide_CharSelectClosed",
"DormGuide_ModeApplied"
},
Ready = function(ctx)
return DormGuideAdapter.CharConfirmReady(ctx:Get("nCharOp"), nRoleId)
end,
Timeout = 300
}
},
{
sName = "approach_avg",
bPlayerWait = true,
WaitTrigger = {
Ready = function()
if DormGuideAdapter.RoleInRoom(nRoleId) ~= true then
return false
end
if SelectOpen() then
return false
end
local nMode = DormGuideAdapter.Mode()
return nMode == 0 or nMode == 1
end,
Timeout = 300
},
Present = {
sKind = "Avg",
sAvgId = DormGuideAdapter.APPROACH_AVG_ID,
sAvgGroup = DormGuideAdapter.APPROACH_AVG_GROUP
},
InputPolicy = {
nSceneCap = nApproachCap,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
},
{
sName = "caress",
bPlayerWait = true,
bReportDone = true,
Poll = function()
if DormGuideAdapter.ContactRole() ~= nRoleId then
return nil
end
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil or obj._mapNode.rtContact == nil or obj._mapNode.rtContact._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.rtContact._mapNode.btnInteractive1)
end,
WaitTrigger = {
Ready = function()
if DormGuideAdapter.ContactRole() ~= nRoleId then
return false
end
return DormGuideAdapter.MarkFocus(nRoleId)
end,
Events = {
"DormShowInteractiveBtns"
},
Match = function(_, bShow)
if bShow == true or DormGuideAdapter.ContactRole() ~= nRoleId then
DormGuideAdapter.ResetFocus()
end
return true
end,
bPlayerWait = true
},
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 180},
Deviation = {5, 5},
Desc = "Guide_524_4",
DescDeviation = {0, -200},
Head = sHead,
HandDeviation = {0, 80},
HandRotation = 180
},
Ready = function(_, tr)
if DormGuideAdapter.MarkFocus(nRoleId) ~= true then
return false
end
local obj = DormGuideAdapter._Interactive()
local anim
if obj ~= nil and obj._mapNode ~= nil and obj._mapNode.rtContact ~= nil and obj._mapNode.rtContact._mapNode ~= nil then
anim = obj._mapNode.rtContact._mapNode.CharInteractiveHideAnim
end
if tr ~= nil and tr.gameObject ~= nil and not tr.gameObject.activeInHierarchy then
return false
end
return DormGuideAdapter.AnimatorSettled(anim, "DormCharInteractiveHide_in")
end,
Events = {
"DormShowInteractiveBtns"
},
Timeout = 300
},
CacheValid = function(_, tr)
if tr == nil or tr.gameObject == nil or not tr.gameObject.activeInHierarchy then
return false
end
return DormGuideAdapter.ContactRole() == nRoleId
end,
InputPolicy = {
enter = {
nSceneCap = nApproachCap,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
click = {
nSceneCap = nCaressCap,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
request = {
nSceneCap = nCaressCap,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
}
},
Action = function(ctx)
local nId, bNew = DormGuideAdapter.BeginCaress()
ctx:Set("nCaressOp", nId)
if not bNew then
return {sState = "pending", nOpId = nId}
end
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil or obj._mapNode.rtContact == nil then
return {sState = "rejected", nOpId = nId}
end
local objContact = obj._mapNode.rtContact
if type(objContact.OnBtnClick_Interactive1) ~= "function" then
return {sState = "rejected", nOpId = nId}
end
objContact:OnBtnClick_Interactive1()
local sPhase = DormGuideAdapter.CaressPhase(nId)
if sPhase == "rejected" then
return {sState = "rejected", nOpId = nId}
end
if sPhase == "opened" then
return {sState = "pending", nOpId = nId}
end
return {sState = "accepted", nOpId = nId}
end,
End = {
sMode = "Condition",
Ready = function(ctx)
local sPhase = DormGuideAdapter.CaressPhase(ctx:Get("nCaressOp"))
return sPhase == "performing" or sPhase == "reward" or sPhase == "level" or sPhase == "done"
end
}
},
{
sName = "caress_feedback",
nSystemTimeout = 3,
WaitTrigger = {
Ready = function(ctx)
return DormGuideAdapter.CaressPhase(ctx:Get("nCaressOp")) == "done"
end,
Events = {
"DormGuide_CaressDone",
"Guide_CloseDisposablePanel"
},
Timeout = 6
},
Present = {sKind = "None"},
InputPolicy = {
nSceneCap = nCaressCap,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true,
bKeepContact = true
},
End = {
sMode = "Condition",
Ready = function(ctx)
return DormGuideAdapter.CaressPhase(ctx:Get("nCaressOp")) == "done"
end,
Timeout = 300
},
OnExit = function()
DormGuideAdapter.HandOffDormUi()
end
},
{
sName = "dict",
bPlayerWait = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK,
bUiBarrier = false,
bLockLeave = false,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
}
}
end
return GuideGroup_524
@@ -0,0 +1,36 @@
local GuideGroup_525 = class("GuideGroup_525")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_525.nGroupId = 525
GuideGroup_525.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_525.bNeedCheckpoint = true
local nDictId = 700105
local CAP = DormGuideUI.InputCap
function GuideGroup_525:OnStart()
end
function GuideGroup_525:OnClear()
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_525:GetSteps()
return {
{
sName = "dict",
bPlayerWait = true,
bReportDone = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = false,
bLockLeave = false,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
}
}
end
return GuideGroup_525
@@ -0,0 +1,153 @@
local GuideGroup_526 = class("GuideGroup_526")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_526.nGroupId = 526
GuideGroup_526.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_526.bNeedCheckpoint = true
local nDictId = 700106
local sHead = "Icon/Head/head_11101"
local CAP = DormGuideUI.InputCap
local bKingRequested = false
local EnsureKingMode = function()
local nState = DormGuideAdapter.ObserveState()
if nState == nil then
return false
end
if nState == 0 and DormGuideAdapter.Mode() == 0 then
return true
end
if bKingRequested then
return DormGuideAdapter.ObserveState() == 0 and DormGuideAdapter.Mode() == 0
end
if nState ~= 1 and DormGuideAdapter.Mode() ~= 1 then
return false
end
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Operate) ~= "function" then
return false
end
bKingRequested = true
obj:OnBtnClick_Operate()
return DormGuideAdapter.ObserveState() == 0 and DormGuideAdapter.Mode() == 0
end
local Mask = function(sDesc)
return {
Size = {220, 220},
Deviation = {0, -5},
Desc = sDesc,
DescDeviation = {-800, 0},
HandDeviation = {0, 150},
HandRotation = 180
}
end
function GuideGroup_526:OnStart()
end
function GuideGroup_526:OnClear()
bKingRequested = false
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_526:GetSteps()
return {
{
sName = "to_king",
ShouldRun = function()
local nState = DormGuideAdapter.ObserveState()
if nState == nil then
return "run"
end
if nState == 0 and DormGuideAdapter.Mode() == 0 then
return "skip"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return EnsureKingMode()
end,
Events = {
"DormGuide_ModeApplied"
},
Timeout = 300
},
Present = {sKind = "None"},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function()
return true
end
}
},
{
sName = "observe",
bPlayerWait = true,
bReportDone = true,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.ObserveState() == 0
end,
Events = {
"DormGuide_ModeApplied"
},
Timeout = 300
},
Poll = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnObserve)
end,
Present = {
sKind = "Mask",
mapMask = Mask("Guide_526_1"),
Show = function(_, tr)
if tr ~= nil then
tr.gameObject:SetActive(true)
end
end
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
},
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Observe) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_Observe()
if DormGuideAdapter.ObserveState() ~= 1 then
return {sState = "rejected"}
end
return {sState = "accepted"}
end,
End = {sMode = "Click"}
},
{
sName = "dict",
bPlayerWait = true,
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = false,
bLockLeave = false,
bHideChrome = false
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
}
}
end
return GuideGroup_526
@@ -0,0 +1,256 @@
local GuideGroup_527 = class("GuideGroup_527")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_527.nGroupId = 527
GuideGroup_527.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_527.bNeedCheckpoint = true
local nDictId = 700107
local bDictShown = false
local nRoomId = DormGuideAdapter.ROOM2_ID
local sHead = "Icon/Head/head_11201"
local CAP = DormGuideUI.InputCap
function GuideGroup_527:OnStart()
end
function GuideGroup_527:OnClear()
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_527:GetSteps()
return {
{
sName = "dict",
bPlayerWait = true,
ShouldRun = function()
if bDictShown then
return "skip"
end
return "run"
end,
Prepare = {
Ready = function()
return DormGuideAdapter.QuestCardSettled()
end,
Timeout = 3
},
Present = {sKind = "Dict", nDictId = nDictId},
InputPolicy = {
enter = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = false
},
present = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true
}
},
End = {
sMode = "Condition",
Ready = function()
return false
end
},
OnExit = function(_, sReason)
if sReason ~= "success" then
return
end
bDictShown = true
DormGuideAdapter.ApplyPolicy({
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
})
end
},
{
sName = "elevator",
bPlayerWait = true,
ShouldRun = function()
local bKnown = DormGuideAdapter.RoomKnown(nRoomId)
if bKnown == nil then
return "run"
end
if bKnown ~= true then
return "abort"
end
if DormGuideAdapter.IsOwnRoom(nRoomId) == true then
return "finish"
end
local PanelManager = require("GameCore.UI.PanelManager")
if PanelManager.CheckPanelOpen(PanelId.DormRoomSelectPanel) then
return "skip"
end
return "run"
end,
WaitTrigger = {
Ready = function()
return DormGuideAdapter.RoomKnown(nRoomId) ~= nil
end,
Timeout = 300
},
Poll = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or obj._mapNode == nil then
return nil
end
return DormGuideAdapter.NodeTr(obj._mapNode.btnElevator)
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {180, 180},
Deviation = {0, -10},
Head = sHead,
Desc = "Guide_527_1",
DescDeviation = {-650, 0},
HandDeviation = {0, 120},
HandRotation = 180
}
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
},
Action = function()
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Elevator) ~= "function" then
return {sState = "rejected"}
end
obj:OnBtnClick_Elevator()
local PanelManager = require("GameCore.UI.PanelManager")
if not PanelManager.CheckPanelOpen(PanelId.DormRoomSelectPanel) then
return {sState = "pending"}
end
return {sState = "accepted"}
end,
End = {
sMode = "Condition",
Events = {
"OnEvent_PanelOnEnableById"
},
Ready = function()
local PanelManager = require("GameCore.UI.PanelManager")
return PanelManager.CheckPanelOpen(PanelId.DormRoomSelectPanel)
end,
Timeout = 300
}
},
{
sName = "go_room",
nSystemTimeout = 3,
bReportDone = true,
ShouldRun = function()
if DormGuideAdapter.IsOwnRoom(nRoomId) == true then
return "finish"
end
local bKnown = DormGuideAdapter.RoomKnown(nRoomId)
if bKnown == false then
return "abort"
end
return "run"
end,
WaitTrigger = {
Ready = function()
local obj = DormGuideUI._GetOverlay("roomSelect")
if obj == nil or obj.tbAllRoom == nil then
return false
end
return DormGuideAdapter.RoomKnown(nRoomId) == true
end,
Events = {
"OnEvent_PanelOnEnableById"
},
Timeout = 300
},
Poll = function()
local obj = DormGuideUI._GetOverlay("roomSelect")
if obj == nil or obj.mapGridCtrl == nil then
return nil
end
for _, objGrid in pairs(obj.mapGridCtrl) do
if objGrid.nRoomId == nRoomId and objGrid._mapNode ~= nil and objGrid._mapNode.btnGo ~= nil then
return objGrid._mapNode.btnGo.transform
end
end
return nil
end,
Present = {
sKind = "Mask",
mapMask = {
Size = {280, 120},
Deviation = {0, 0},
Head = sHead,
Desc = "Guide_527_2",
DescDeviation = {700, 0},
HandDeviation = {0, 120},
HandRotation = 180
},
Show = function(_, tr)
if tr ~= nil then
tr.gameObject:SetActive(true)
end
end,
Events = {
"DormRoomSelect_UnlockAnimEnd"
},
Match = function(ctx, nId)
if nId ~= nRoomId then
return false
end
ctx:Set("bUnlockAnimEnd", true)
return true
end,
Ready = function(ctx, tr)
local obj = DormGuideUI._GetOverlay("roomSelect")
if obj == nil or type(obj.IsRoomAvailable) ~= "function" then
return false
end
if obj:IsRoomAvailable(nRoomId) ~= true then
return false
end
if ctx:Get("bUnlockAnimEnd") ~= true then
return false
end
return tr ~= nil and tr.gameObject.activeInHierarchy
end,
Timeout = 300
},
InputPolicy = {
nSceneCap = DormGuideUI.DEFAULT_BLOCK | CAP.Move,
bUiBarrier = true,
bLockLeave = true,
bHideChrome = false
},
Action = function()
local obj = DormGuideUI._GetOverlay("roomSelect")
if obj == nil or obj.mapGridCtrl == nil then
return {sState = "rejected"}
end
for _, objGrid in pairs(obj.mapGridCtrl) do
if objGrid.nRoomId == nRoomId and type(objGrid.OnBtnClick_Go) == "function" then
objGrid:OnBtnClick_Go()
return {sState = "pending"}
end
end
return {sState = "rejected"}
end,
End = {
sMode = "Event",
Events = {
"OnEvent_DormLevelLoadComplete",
"DormRoomSelect_ChangeRoomResult"
},
Ready = function()
return DormGuideAdapter.RoomArrived(nRoomId)
end,
Timeout = 20
}
}
}
end
return GuideGroup_527
@@ -0,0 +1,94 @@
local GuideGroup_528 = class("GuideGroup_528")
local DormGuideUI = require("Game.UI.Dorm.DormGuideUI")
local DormGuideAdapter = require("Game.UI.Dorm.DormGuideAdapter")
GuideGroup_528.nGroupId = 528
GuideGroup_528.nGuideType = AllEnum.GuideType.Dorm
GuideGroup_528.bNeedCheckpoint = true
local sAvgId = "BBm_DormIndoor"
local sAvgGroupId = "1"
local CAP = DormGuideUI.InputCap
local nScanBlock = CAP.Pan | CAP.Rotate | CAP.Zoom | CAP.Move | CAP.PickActor | CAP.PickFur
local nAvgCap = CAP.Zoom | CAP.PickFur
local bKingRequested = false
local RequestKingMode = function()
local nState = DormGuideAdapter.ObserveState()
if nState == 0 or nState == nil and DormGuideAdapter.Mode() == 0 then
return true
end
if nState ~= 1 and DormGuideAdapter.Mode() ~= 1 then
return false
end
if bKingRequested then
return DormGuideAdapter.ObserveState() == 0
end
local obj = DormGuideAdapter._Interactive()
if obj == nil or type(obj.OnBtnClick_Operate) ~= "function" then
return false
end
bKingRequested = true
obj:OnBtnClick_Operate()
return DormGuideAdapter.ObserveState() == 0
end
function GuideGroup_528:OnStart()
end
function GuideGroup_528:OnClear()
EventManager.Hit(EventId.AvgBubbleExit)
DormGuideAdapter.ReleaseGuide()
end
function GuideGroup_528:GetSteps()
return {
{
sName = "indoor_avg",
bPlayerWait = true,
bReportDone = true,
OnEnter = function()
DormGuideAdapter.ApplyPolicy({
nSceneCap = nScanBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true
})
end,
WaitTrigger = {
Ready = function()
if not DormGuideAdapter.RoomEnterReady(DormGuideAdapter.ROOM2_ID) then
return false
end
return RequestKingMode()
end,
Events = {
"OnEvent_DormLevelLoadComplete",
"DormGuide_ElevatorExit",
"DormGuide_ModeApplied"
},
Timeout = 20
},
Present = {
sKind = "Avg",
sAvgId = sAvgId,
sAvgGroup = sAvgGroupId
},
InputPolicy = {
enter = {
nSceneCap = nScanBlock,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true
},
present = {
nSceneCap = nAvgCap,
bUiBarrier = false,
bLockLeave = true,
bHideChrome = true
}
},
End = {
sMode = "Condition",
Ready = function()
return false
end
}
}
}
end
return GuideGroup_528
@@ -0,0 +1,61 @@
local GuideGroup_53 = class("GuideGroup_53")
local mapEventConfig = {}
local groupId = 53
local totalStep = 1
local current = 1
function GuideGroup_53:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_53: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_53: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_53:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_53:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_53:Step_1()
local nEntryId = 300120
self.waitAnimTime = 0.3
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, nEntryId)
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
end
cs_coroutine.start(wait)
end
function GuideGroup_53:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
end
return GuideGroup_53
@@ -0,0 +1,61 @@
local GuideGroup_55 = class("GuideGroup_55")
local mapEventConfig = {}
local groupId = 55
local totalStep = 1
local current = 1
function GuideGroup_55:Init(parent, runStep)
self:BindEvent()
self.parent = parent
current = 1
local funName = "Step_" .. current
local func = handler(self, self[funName])
func()
end
function GuideGroup_55: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_55: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_55:SendGuideStep(step)
self.parent:SendGuideStep(groupId, step)
end
function GuideGroup_55:Clear()
self.runGuide = false
self:UnBindEvent()
self.parent = nil
end
function GuideGroup_55:Step_1()
local nEntryId = 300121
self.waitAnimTime = 0.3
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(self.waitAnimTime))
EventManager.Hit(EventId.OpenPanel, PanelId.DictionaryEntry, nEntryId)
self:SendGuideStep(-1)
self.parent:ClearCurGuide(true)
end
cs_coroutine.start(wait)
end
function GuideGroup_55:FinishCurrentStep()
self.msg = nil
self.openPanelId = nil
self.waitAinEnd = nil
self.runGuide = false
end
return GuideGroup_55
@@ -64,8 +64,8 @@ end
function GuideGroup_7:Step_2()
self.msg = {
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/imgPhoneBg/PhoneContent/LevelMenu/btnResource",
Size = {450, 360},
Deviation = {0, 170},
Size = {450, 270},
Deviation = {0, 130},
Head = "Icon/Head/head_11101",
Desc = "Guide_7_2",
DescDeviation = {-800, -40},