From 0875314a5d2379ef26a38ed0431981fec7bac649 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 11 Jan 2021 17:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=BD=A6=E8=BF=9F=E6=96=97=E6=B3=95?= =?UTF-8?q?=E3=80=91=E8=B7=A8=E6=9C=9F=E7=AB=8B=E7=BB=98=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit cabce586bf1111b0d204ab0c65b287a357f18182) --- .../Guild/CarDelay/GuildCarDelayMainPanel.lua | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua index 3c9f072f01..6297f6c62b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua @@ -181,7 +181,9 @@ end function this.ShowTitleAllData() curMonsterId = GuildCarDelayManager.bossIndexId curMonsterIdConFig = ConfigManager.GetConfigData(ConfigName.WorldBossConfig,curMonsterId) - Log("BossId:"..curMonsterIdConFig.Boss) + --获取上一个boss数据 + local lastMonsterId,lastMonsterIdConFig = this.GetLastBoss(curMonsterId) + Log("curMonsterId:"..curMonsterIdConFig.Boss.." lastMonsterId:"..lastMonsterIdConFig.Boss) this.name.text = heroConfig[curMonsterIdConFig.Boss].ReadingName this.proImage.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig[curMonsterIdConFig.Boss].PropertyName)) curProgress = GuildCarDelayManager.progress @@ -203,7 +205,7 @@ function this.ShowTitleAllData() this.timer = nil end this.timeTextGo:SetActive(true) - this.timeText2.text = Language[11040] + this.timeText2.text = "车迟斗法将于次日0点重置。" --else elseif curProgress == -1 then timeText = Language[11041] @@ -219,20 +221,32 @@ function this.ShowTitleAllData() timeText = Language[11044] this.RemainTimeDown(this.timeTextGo,this.timeText,this.timeNumText,GuildCarDelayManager.endTime - GetTimeStamp(),timeText) end - if testLiveGO then - poolManager:UnLoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), testLiveGO) - end - local pos = heroConfig[curMonsterIdConFig.Boss].Position - testLiveGO = poolManager:LoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), this.live2dRoot.transform, Vector3.one*heroConfig[curMonsterIdConFig.Boss].Scale, Vector3.New(pos[1], pos[2], 0)) - LogYellow("############") - this.live2dRoot.transform.localScale = Vector3.one*0.8 - if curMonsterIdConFig.Boss == 10023 then--孙悟空太大了特殊处理了 - this.live2dRoot.transform.localPosition = Vector3.New(0,80,0) - else - this.live2dRoot.transform.localPosition = Vector3.New(0,170,0) - end - this.RefrePanelRedPoint() + if testLiveGO then + poolManager:UnLoadLive(GetResourcePath(heroConfig[lastMonsterIdConFig.Boss].Live), testLiveGO) + poolManager:UnLoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), testLiveGO) end + local pos = heroConfig[curMonsterIdConFig.Boss].Position + testLiveGO = poolManager:LoadLive(GetResourcePath(heroConfig[curMonsterIdConFig.Boss].Live), this.live2dRoot.transform, Vector3.one*heroConfig[curMonsterIdConFig.Boss].Scale, Vector3.New(pos[1], pos[2], 0)) + this.live2dRoot.transform.localScale = Vector3.one*0.8 + if curMonsterIdConFig.Boss == 10023 then--孙悟空太大了特殊处理了 + this.live2dRoot.transform.localPosition = Vector3.New(0,80,0) + else + this.live2dRoot.transform.localPosition = Vector3.New(0,170,0) + end + this.RefrePanelRedPoint() +end + +function this.GetLastBoss(curBossId) + local lastIndex = 0 + if curBossId == 1 then + lastIndex = #ConfigManager.GetConfig(ConfigName.WorldBossConfig) + else + lastIndex = curBossId - 1 + end + local lastMonsterIdConFig = ConfigManager.GetConfigData(ConfigName.WorldBossConfig,lastIndex) + return lastMonsterIdConFig.Boss,lastMonsterIdConFig +end + -- tab节点显示自定义 function this.TabAdapter(tab, index, status) local tabLab = Util.GetGameObject(tab, "Text")