diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua index 443bb89941..3427364491 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayMainPanel.lua @@ -179,7 +179,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 @@ -201,7 +203,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] @@ -217,20 +219,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")