diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index d4d42e2b7b..fb86d42cba 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -806,6 +806,16 @@ function this.RefreshTriggerListen(id, openType, openArgs) end end Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger) + elseif openType == 38 then + --战斗失败算 + local trigger + trigger = function(panelType) + if panelType == UIName.BattleFailPopup then + Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, trigger) + this.ShowGuide(id) + end + end + Game.GlobalEvent:AddEvent(GameEvent.UI.OnOpen, trigger) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index 02480a7e5d..0da4995856 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -517,6 +517,20 @@ function this.ExecuteBehavior(beType, beArgs) Util.AddClick(this.button, this.NextGuide) end) this.SetBtnGOPosition(btn.gameObject:GetComponent("RectTransform").position) + elseif beType == 20 then -- 进入假战斗 + this.canvas.enabled=false + this.dialogRoot:SetActive(false) + this.mask:SetActive(false) + this.tipButtomRoot:SetActive(false) + + local fdata, fseed = BattleManager.GetFakeBattleData(tonumber(beArgs)) + local testFightData = { + fightData = fdata, + fightSeed = fseed, + fightType = 0, + maxRound = 20 + } + UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test) end end @@ -556,6 +570,7 @@ end function this.ShowGuide(id) this.id = id + this.canvas.enabled = true this.gameObject:GetComponent("Image").raycastTarget = true if GuideConfig[id].Position then this.dialogRoot:SetActive(true)