From 67bed9943300c61c1057b59136d2efb5201ed78a Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 9 Jun 2021 14:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90ID1009324=E3=80=91=20=E5=89=A7?= =?UTF-8?q?=E6=83=85=E5=8A=A8=E7=94=BB=E4=B8=AD=E5=8E=BB=E6=8E=89=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E6=8C=82=E6=9C=BA=E6=97=B6=E7=9A=84=E9=9F=B3=E6=95=88?= =?UTF-8?q?=EF=BC=88=E6=88=98=E6=96=97=EF=BC=8C=E8=B5=B0=E8=B7=AF=E8=84=9A?= =?UTF-8?q?=E6=AD=A5=E5=A3=B0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Fight/FightPointPassMainPanel.lua | 7 ++++++- .../~Lua/Modules/Fight/View/FightPointMapView.lua | 5 ++++- .../~Lua/Modules/Popup/UnlockCheckpointPopup.lua | 11 +++++++---- .../~Lua/Modules/Story/StoryDialoguePanel.lua | 2 +- .../~Lua/Modules/Story/StoryManager.lua | 6 +++--- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index b5dafeaf6b..a6de116ae3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -653,7 +653,12 @@ end -- 执行关卡战斗 function this.ExcuteBattle() if not FightPointPassManager.IsChapterClossState() then - fightMap.StopAction() + --fightMap.StopAction() + if hasMap then + LogGreen("关闭挂机") + fightMap:OnClose() + hasMap = false + end UIManager.OpenPanel(UIName.FightMiddleChoosePanel, FightPointPassManager.curOpenFight, true,function () --- 临时代码 --FightPointPassManager.SetChapterOpenState(false) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua index f38a5b348d..4212740d34 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua @@ -66,6 +66,7 @@ local m_parent this.isClose = false --root FightPointPassMainPanel.gameObject FightPointPassMainPanel脚本 function this:InitComponent(root, parent) + LogGreen("初始化地图资源") m_orginLayer = 0 m_parent = parent -- 地图点击拖动 @@ -461,6 +462,7 @@ end --- ====================================================================== function this.OnGameOver() + LogGreen("OnGameOver") for i, v in pairs(this.playerViews) do if v then SubUIManager.Close(v) @@ -474,7 +476,7 @@ function this.OnGameOver() end end if this.mapRoot then -- 避免不是主动退出 - --Log("注销一次地图资源") + LogGreen("注销一次地图资源") poolManager:UnLoadAsset(mapCtrl, this.mapRoot, PoolManager.AssetType.GameObject) poolManager:UnLoadAsset(effectPath, this.moneyEffect, PoolManager.AssetType.GameObject) UIManager.camera.clearFlags = CameraClearFlags.Skybox @@ -487,6 +489,7 @@ function this.OnGameOver() end function this:OnClose() + LogGreen("关闭挂机:OnClose") if this.startTimer then this.startTimer:Stop() end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/UnlockCheckpointPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/UnlockCheckpointPopup.lua index ca743255ba..99f7f815c3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/UnlockCheckpointPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/UnlockCheckpointPopup.lua @@ -33,10 +33,13 @@ function UnlockCheckpointPopup:BindEvent() end) Util.AddClick(this.btnGo, function() self:ClosePanel() - --JumpManager.GoJump(26078) - UIManager.OpenPanel(UIName.FightPointPassMainPanel, function() - -- 章节解锁时添加对话 - StoryManager.EventTrigger(curChapterId) + if UIManager.IsOpen(UIName.FightPointPassMainPanel) then + UIManager.ClosePanel(UIName.FightPointPassMainPanel) + end + -- 章节解锁时添加对话 + StoryManager.EventTrigger(curChapterId, function() + LogGreen("打开挂机界面") + UIManager.OpenPanel(UIName.FightPointPassMainPanel) end) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryDialoguePanel.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryDialoguePanel.lua index fb5045aaab..98820b96bf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryDialoguePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryDialoguePanel.lua @@ -74,7 +74,7 @@ function StoryDialoguePanel:GoNext(optionID) end -- 点击下一步关闭配音音效关闭 SoundManager.StopSoundByChannel(10) - StoryManager.StoryJumpType(optionID, self) + StoryManager.StoryJumpType(optionID, self,static_callBack) end --添加事件监听(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua index 1dea2b7346..6a2f07e32c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua @@ -97,7 +97,7 @@ function this.DialogueTrigger(eventId, callback) end -- 剧情跳转 -function this.StoryJumpType(optionId, panel) +function this.StoryJumpType(optionId, panel,callBack) local jumpType = chapterOptionData[optionId].JumpType if jumpType then if jumpType == 4 then -- 关闭所有界面,结束对话 @@ -125,10 +125,10 @@ function this.StoryJumpType(optionId, panel) local nextEventId = chapterOptionData[optionId].JumpTypeValues local nextEventShowType = chapterDataConfig[nextEventId].ShowType if nextEventShowType ~= 13 then - this.EventTrigger(nextEventId, false) + this.EventTrigger(nextEventId, callBack) else - this.DialogueTrigger(nextEventId) + this.DialogueTrigger(nextEventId,callBack) end end end