From 39a404ab41bf4b781c1bbe9a90ca06af25af5963 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 15 Mar 2021 20:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ios=E3=80=91=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E6=88=98=E6=96=97=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/View/GuideBattlePanel.lua | 2 +- .../~Lua/Modules/Login/LoginPanel.lua | 2 ++ .../~Lua/Modules/Story/StoryManager.lua | 28 +++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index a14fce6205..726fdefdb8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -13,7 +13,7 @@ local fightType -- 1关卡 2副本 3限时怪, 5兽潮, 6新关卡, 7公会boss local orginLayer --初始化组件(用于子类重写) function this:InitComponent() - BattleView:InitComponent(self) + BattleView:InitComponent(self, self.gameObject) orginLayer = 0 this.BG = Util.GetGameObject(self.gameObject, "BG") diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index 2e2b54998c..69f400c1ea 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -490,6 +490,8 @@ function this.ExecuteLoading() NetManager.LoginConfimRequest() if AppConst.isGuide then if GuideManager.GetCurId(GuideType.Force) == 1 and PlayerManager.nickName == tostring(PlayerManager.uid) and PlayerManager.level == 1 then + -- 新的引导 + -- StoryManager.EventTrigger(300001) --创号阶段先进入剧情对话,进入假战斗,然后对话起名,最后进入主界面 StoryManager.EventTrigger(100001, function() PatFaceManager.isLogin = true diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua index 8547fdf932..5fdf51cb4a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua @@ -47,8 +47,27 @@ function this.EventTrigger(eventId, callBack) elseif showType == 12 then -- 选择界面 UIManager.OpenPanel(UIName.StoryDialoguePanel, eventId, false) --UIManager.OpenPanel(UIName.StoryOptionPopup, eventId) - elseif showType == 10 then -- 起名字界面 + elseif showType == 10 then -- 起名字界面 UIManager.OpenPanel(UIName.CreateNamePopup, showType, eventId, showValues, options) + elseif showType == 14 then -- 引导战斗 + local fb = ConfigManager.GetConfigData(ConfigName.FakeBattle, 1004) + local testFightData = { + fightData = loadstring("return "..fb.FightData)(), + fightSeed = fb.TimeSeed, + fightType = 0, + maxRound = 20 + } + UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function() + StoryManager.EventTrigger(300017, function () + PatFaceManager.isLogin = true + UIManager.OpenPanel(UIName.FightPointPassMainPanel) + LoadingPanel.End() + end) + end) + elseif showType == 15 then -- 播放转场特效 + SwitchPanel.PlayTransEffect(function() + this.StoryJumpType(options[1]) + end) end else Log("表数据不存在!!请检查表格!") @@ -79,13 +98,12 @@ end -- 剧情跳转 function this.StoryJumpType(optionId, panel) - Log("OptionId " .. optionId) local jumpType = chapterOptionData[optionId].JumpType - - if jumpType then if jumpType == 4 then -- 关闭所有界面,结束对话 - panel:ClosePanel() + if panel then + panel:ClosePanel() + end if UIManager.IsOpen(UIName.StoryDialoguePanel) then UIManager.ClosePanel(UIName.StoryDialoguePanel) end