From 9c50acee097897037783b0e7cc21fc49d307ce5c Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 15 Nov 2021 16:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BC=95=E5=AF=BC=E6=88=98=E6=96=97?= =?UTF-8?q?=E3=80=91=E6=B7=BB=E5=8A=A0=E7=AC=ACN=E5=9B=9E=E5=90=88?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=97=B6=E8=A7=A6=E5=8F=91=E5=89=A7=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/View/GuideBattleLogic.lua | 27 +++++++++++++++++++ .../Modules/Battle/View/GuideBattlePanel.lua | 2 ++ 2 files changed, 29 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattleLogic.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattleLogic.lua index 93f22ac24f..1c61b15268 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattleLogic.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattleLogic.lua @@ -79,6 +79,33 @@ function GuideBattleLogic:OnBattleStart(func) end) end end + +function GuideBattleLogic:OnRoundChanged(round) + -- 没有就不引导了 + if not self.configList or #self.configList <= 0 then + return + end + local _config = nil + for _, con in ipairs(self.configList) do + if con.Round == -3 and con.Camp == round then -- 战中第n回合触发 + _config = con + break + end + end + if not _config then + return + end + -- 对话形式的引导 + if _config.TriggerType == 1 then + BattleManager.SetGuidePause(true) + local storyId = _config.TriggerId + StoryManager.EventTrigger(storyId, function() + BattleManager.SetGuidePause(false) + end) + end +end + +-- 战斗结束 function GuideBattleLogic:OnBattleEnd(func) -- 没有就不引导了 if not self.configList or #self.configList <= 0 then diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index 6525c67b03..1bbfd99673 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -183,6 +183,8 @@ function this.OnRoundChanged(round) local curRound, maxRound = BattleLogic.GetCurRound() this.roundText.text = string.format(Language[10211], curRound, maxRound) + --显示波次 + GuideBattleLogic:OnRoundChanged(round) end -- 角色轮转回调