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 -- 角色轮转回调