From f7a1ddbc9404f8b5c1256bb8154df5c4f6fdc808 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 15 Nov 2021 16:39:38 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=81=87=E6=88=98=E6=96=97=E3=80=91?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=B5=B0=E8=A1=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/BattlePanel.lua | 7 +++++-- .../~Lua/Modules/Battle/View/GuideBattlePanel.lua | 6 +++--- .../ManagedResources/~Lua/Modules/Story/StoryManager.lua | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 84dbf1984d..47129d8a2a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -224,8 +224,11 @@ function this:OnOpen(_fightData, _fightType, _endFunc, _guideType,isChangeBGM) isBack = _fightType == BATTLE_TYPE.BACK --判定是否是战斗回放 hadCounted = 0 -- LogPink(fightType) - this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType)) - + if _fightData.bg then + this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(_fightData.bg) + else + this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType)) + end -- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function() if not isChangeBGM then SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua index 3112715be2..6525c67b03 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/GuideBattlePanel.lua @@ -86,10 +86,10 @@ function this:OnOpen(_fightData, _endFunc, guideType) endFunc = _endFunc fightType = BATTLE_TYPE.Test --判定战斗类型 - if guideType == 1 then - this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_zhandou_changjing_1005") + if _fightData.bg then + this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(_fightData.bg) else - this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_zhandou_changjing_2") + this.BG:GetComponent("Image").sprite = this.spLoader:LoadSprite(BattleManager.GetBattleBg(fightType)) end this.BtnGM:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua index e4870d1b9d..d55da10315 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryManager.lua @@ -5,6 +5,7 @@ local chapterDataConfig = ConfigManager.GetConfig(ConfigName.ChapterEventPointCo local chapterOptionData = ConfigManager.GetConfig(ConfigName.ChapterOptionConfig) local chapterTitleData = ConfigManager.GetConfig(ConfigName.LevelSetting) local dialogueSetData = ConfigManager.GetConfig(ConfigName.DialogueViewConfig) +local FakeBattleNew = ConfigManager.GetConfig(ConfigName.FakeBattleNew) @@ -56,7 +57,8 @@ function this.EventTrigger(eventId, callBack) fightData = fdata, fightSeed = fseed, fightType = BATTLE_SERVER_TYPE.StoryFight, - maxRound = 20 + maxRound = 20, + bg = FakeBattleNew[options[1]].BgName } local panel = UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function() StoryManager.StoryJumpType(options[3])