From d6335b051cbd945a40cba292affcd368624156f2 Mon Sep 17 00:00:00 2001 From: vurtne14 Date: Wed, 19 Nov 2025 14:46:04 +0800 Subject: [PATCH] 1 --- .../~Lua/Common/functions.lua | 4 +- .../AgainRecharge/AgainRechargePanel.lua | 82 +++++++++---------- .../AlameinWar/AlameinWarStagePanel.lua | 4 +- .../Carbon/XuanYuanMirrorPanelList.lua | 4 +- .../ClimbTowerEliteGoFightPopup.lua | 4 +- .../ClimbTower/ClimbTowerGoFightPopup.lua | 4 +- .../~Lua/Modules/Expert/BoxPool.lua | 4 +- .../Expert/DynamicActivityExChange.lua | 6 +- .../~Lua/Modules/Expert/PatFaceManager.lua | 1 + .../Transcript/GuildTranscriptMainPopup.lua | 4 +- .../~Lua/Modules/Hegemony/HegemonyPopup.lua | 4 +- .../~Lua/Modules/Main/MainPanel.lua | 2 +- .../~Lua/Modules/Map/ShowEnemyInfoPanel.lua | 6 +- .../Minsk/BattleOfMinskDocumentPopup.lua | 2 +- .../Modules/Minsk/BattleOfMinskMainPanel.lua | 2 +- .../~Lua/Modules/PVEActivity/ChanagePanel.lua | 4 +- .../Modules/PowerCenter/PowerCenterPanel.lua | 10 ++- 17 files changed, 76 insertions(+), 71 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index a7fb094d1..7c0abe754 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -2331,9 +2331,9 @@ function LoadHerolive(_heroConfig, _objPoint, isStatic) end --卸载立绘 -function UnLoadHerolive(_heroConfig, _obj) +function UnLoadHerolive(_heroConfig, _obj, isStatic) local artResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig) - if _heroConfig.RoleImage ~= 0 then + if _heroConfig.RoleImage ~= 0 and not isStatic then poolManager:UnLoadLive(artResourcesConfig[_heroConfig.RoleImage].Name, _obj) else poolManager:UnLoadAsset("TestImg", _obj, PoolManager.AssetType.gameObject) diff --git a/Assets/ManagedResources/~Lua/Modules/AgainRecharge/AgainRechargePanel.lua b/Assets/ManagedResources/~Lua/Modules/AgainRecharge/AgainRechargePanel.lua index c9307ecaa..a015a9b3f 100644 --- a/Assets/ManagedResources/~Lua/Modules/AgainRecharge/AgainRechargePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/AgainRecharge/AgainRechargePanel.lua @@ -13,8 +13,8 @@ local this = AgainRechargePanel local kMaxTab, kMaxDay = 2, 3 local TextColorDef = { - [1] = Color.New(255 / 255, 255 / 255, 255 / 255, 76/255), - [2] = Color.New(255 / 255, 255 / 255, 255 / 255, 204/255) + [1] = Color.New(255 / 255, 255 / 255, 255 / 255, 76 / 255), + [2] = Color.New(255 / 255, 255 / 255, 255 / 255, 204 / 255) } local orginLayer local activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig) @@ -42,27 +42,27 @@ function AgainRechargePanel:InitComponent() this.pro = Util.GetGameObject(this.lihuiInfo, "pro"):GetComponent("Image") self.closeBtn = Util.GetGameObject(self.transform, "closeBtn") - this.Btnback = Util.GetGameObject(this.transform, "Btnback") + this.Btnback = Util.GetGameObject(this.transform, "Btnback") self.selectTabIndex = -1 self.dayRewardList = {} for i = 1, kMaxDay do - self.dayRewardList[i] = DayRewardItem.new(self,self.transform:Find("frame/rewardBg/rewardDay" .. i)) + self.dayRewardList[i] = DayRewardItem.new(self, self.transform:Find("frame/rewardBg/rewardDay" .. i)) end --bottomPart self.reChargeBtn = Util.GetGameObject(self.transform, "frame/rechargeBtn") self.reChargeTips = Util.GetGameObject(self.transform, "frame/tips"):GetComponent("Text") - self.LeftTip = Util.GetGameObject(self.transform, "frame/Image/LeftText"):GetComponent("Text") + self.LeftTip = Util.GetGameObject(self.transform, "frame/Image/LeftText"):GetComponent("Text") self.effect = Util.GetGameObject(self.transform, "frame/effect") - --local LeftTip = Util.GetGameObject(self.transform, "frame/Image/LeftText"):GetComponent("Text") - --if GetChannelConfig().RechargeNum_Mode == 1 then - -- LeftTip.Text = GetLanguageStrById(50417) - --else - -- LeftTip.Text = GetLanguageStrById(50419) - --end + --local LeftTip = Util.GetGameObject(self.transform, "frame/Image/LeftText"):GetComponent("Text") + --if GetChannelConfig().RechargeNum_Mode == 1 then + -- LeftTip.Text = GetLanguageStrById(50417) + --else + -- LeftTip.Text = GetLanguageStrById(50419) + --end -- effectAdapte(Util.GetGameObject(self.effect, "Partical/ziti mask (1)")) -- self.oneLihuiInfo = Util.GetGameObject(self.transform,"hero/oneLihuiInfo") @@ -72,13 +72,12 @@ function AgainRechargePanel:BindEvent() Util.AddClick(self.closeBtn, function() self:ClosePanel() end) - Util.AddClick(this.Btnback, function() + Util.AddClick(this.Btnback, function() self:ClosePanel() end) Util.AddClick(self.reChargeBtn, function() self:OnRechargeBtnClicked() end) - end function AgainRechargePanel:OnSortingOrderChange() @@ -89,8 +88,9 @@ function AgainRechargePanel:OnSortingOrderChange() -- self.dayRewardList[i]:OnSortingOrderChange(self.sortingOrder) -- end end + local fun = nil -function AgainRechargePanel:OnOpen(context,_fun) +function AgainRechargePanel:OnOpen(context, _fun) context = context and context or {} self.selectTabIndex = context.tabIndex and context.tabIndex or 1 fun = _fun @@ -105,22 +105,22 @@ function AgainRechargePanel:OnShow() AccumRecharge = missInfo.progress end end - --根据渠道配置界面显示充值金额或充值积分 - if GetChannelConfig().RechargeNum_Mode == 1 then - self.reChargeTips.text = string.format(GetLanguageStrById(50420), AccumRecharge/1000) - self.LeftTip.text = GetLanguageStrById(50512) - else - self.reChargeTips.text = string.format(GetLanguageStrById(10663), AccumRecharge/100) - self.LeftTip.text = GetLanguageStrById(50513) - end - + --根据渠道配置界面显示充值金额或充值积分 + if GetChannelConfig().RechargeNum_Mode == 1 then + self.reChargeTips.text = string.format(GetLanguageStrById(50420), AccumRecharge / 1000) + self.LeftTip.text = GetLanguageStrById(50512) + else + self.reChargeTips.text = string.format(GetLanguageStrById(10663), AccumRecharge / 100) + self.LeftTip.text = GetLanguageStrById(50513) + end + -- this.oneHeroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,showHeroId) -- this.Onelive = LoadHerolive(this.oneHeroData,this.oneLihui.transform) -- Util.GetGameObject(self.oneLihuiInfo,"name"):GetComponent("Text").text = GetLanguageStrById(this.oneHeroData.ReadingName) -- Util.GetGameObject(self.oneLihuiInfo,"pro"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(this.oneHeroData.PropertyName)) - thread = coroutine.start(function () + thread = coroutine.start(function() for i = 1, 10, 0 do AgainSetHeroData(AgainGetHeroId()) end @@ -129,7 +129,7 @@ end function AgainSetHeroData(heroId) if this.liveNode then - UnLoadHerolive(this.heroData, this.liveNode) + UnLoadHerolive(this.heroData, this.liveNode, true) Util.ClearChild(this.lihui.transform) this.liveNode = nil end @@ -138,11 +138,11 @@ function AgainSetHeroData(heroId) this.name.text = GetLanguageStrById(this.heroData.ReadingName) this.pro.sprite = Util.LoadSprite(GetProStrImageByProNum(this.heroData.PropertyName)) - this.liveNode = LoadHerolive(this.heroData, this.lihui.transform,true) - - local stopV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3],0) - local startV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3],0) - local endV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3],0) + this.liveNode = LoadHerolive(this.heroData, this.lihui.transform, true) + + local stopV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3], 0) + local startV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3], 0) + local endV3 = Vector3.New(this.heroData.Static[2], this.heroData.Static[3], 0) startV3.x = 1000 endV3.x = -1000 @@ -205,7 +205,6 @@ function AgainRechargePanel:OnTabClicked(index) end function AgainRechargePanel:OnTabChanged(index) - self:ShowContent(index) self.selectTabIndex = index curIndex = index @@ -218,17 +217,17 @@ end function AgainRechargePanel:ShowContent(index) local tempData = {} for _, rewardInfo in ConfigPairs(activityRewardConfig) do - if rewardInfo.ActivityId == ActivityTypeDef.AgainRecharge then + if rewardInfo.ActivityId == ActivityTypeDef.AgainRecharge then table.insert(tempData, rewardInfo) end end - local day = GetTimePass(FirstRechargeManager.GetRechargeTime(tempData[1].Values[1][1]))-- - - if day >=1 and FirstRechargeManager.GetAccumRechargeValue() > 0 then --可领取的话 充值按钮 - self.reChargeBtn:SetActive(false) - else - self.reChargeBtn:SetActive(true) - end + local day = GetTimePass(FirstRechargeManager.GetRechargeTime(tempData[1].Values[1][1])) -- + + if day >= 1 and FirstRechargeManager.GetAccumRechargeValue() > 0 then --可领取的话 充值按钮 + self.reChargeBtn:SetActive(false) + else + self.reChargeBtn:SetActive(true) + end for i, dayRewardItem in ipairs(self.dayRewardList) do dayRewardItem:SetValue(tempData[i], self.sortingOrder) @@ -256,11 +255,10 @@ function AgainRechargePanel:OnClose() fun = nil end if this.liveNode then - UnLoadHerolive(this.heroData, this.liveNode) + UnLoadHerolive(this.heroData, this.liveNode, true) Util.ClearChild(this.lihui.transform) this.liveNode = nil end - end -return AgainRechargePanel \ No newline at end of file +return AgainRechargePanel diff --git a/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarStagePanel.lua b/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarStagePanel.lua index b00338432..36855245f 100644 --- a/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarStagePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarStagePanel.lua @@ -197,7 +197,7 @@ function AlameinWarStagePanel:ChangeStageUI(stageId) local stage = AlameinWarManager.stagesById[stageId] if this.live then - UnLoadHerolive(heroTData,this.live) + UnLoadHerolive(heroTData,this.live, true) Util.ClearChild(this.BossIcon.transform) end @@ -335,7 +335,7 @@ function AlameinWarStagePanel:OnDestroy() SubUIManager.Close(this.UpView) -- SubUIManager.Close(this.BtView) if this.live then - UnLoadHerolive(heroTData,this.live) + UnLoadHerolive(heroTData,this.live, true) Util.ClearChild(this.BossIcon.transform) end diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua index 665c3033b..319287629 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua @@ -134,7 +134,7 @@ function this:SwitchView() title.text = mirrors[curType].title if this.liveObg then - UnLoadHerolive(heroConfig[mirrors[curType].bg],this.liveObj) + UnLoadHerolive(heroConfig[mirrors[curType].bg],this.liveObj, true) Util.ClearChild(this.live.transform) this.liveObj = nil end @@ -356,7 +356,7 @@ end --界面关闭时调用(用于子类重写) function this:OnClose() if this.liveObg then - UnLoadHerolive(heroConfig[mirrors[curType].bg],this.liveObj) + UnLoadHerolive(heroConfig[mirrors[curType].bg],this.liveObj, true) Util.ClearChild(this.live.transform) this.liveObj = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerEliteGoFightPopup.lua b/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerEliteGoFightPopup.lua index b9d6cb9ae..8ec7268f0 100644 --- a/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerEliteGoFightPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerEliteGoFightPopup.lua @@ -162,7 +162,7 @@ function ClimbTowerEliteGoFightPopup:Init() this.title.text = GetLanguageStrById(towerData.Name) if this.liveObj then - UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj) + UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj, true) Util.ClearChild(this.live.transform) end this.liveObj = LoadHerolive(HeroConfig[towerData.VisibleTank],this.live.transform,true) @@ -234,7 +234,7 @@ end --界面关闭时调用(用于子类重写) function ClimbTowerEliteGoFightPopup:OnClose() if this.liveObj then - UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj) + UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj, true) Util.ClearChild(this.live.transform) end end diff --git a/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerGoFightPopup.lua b/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerGoFightPopup.lua index 2113306cb..68f6af3f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerGoFightPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/ClimbTower/ClimbTowerGoFightPopup.lua @@ -163,7 +163,7 @@ function ClimbTowerGoFightPopup:Init() -- poolManager:LoadLive(spinePrefabName,this.TankImg.transform,Vector3.New(1, 1,1), if this.liveObj then - UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj) + UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj, true) Util.ClearChild(this.TankImg.transform) this.liveObj = nil end @@ -213,7 +213,7 @@ end --界面关闭时调用(用于子类重写) function ClimbTowerGoFightPopup:OnClose() if this.liveObj then - UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj) + UnLoadHerolive(HeroConfig[towerData.VisibleTank],this.liveObj, true) Util.ClearChild(this.TankImg.transform) this.liveObj = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/BoxPool.lua b/Assets/ManagedResources/~Lua/Modules/Expert/BoxPool.lua index f01391a72..248dac048 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/BoxPool.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/BoxPool.lua @@ -72,7 +72,7 @@ function BoxPool:OnShow(sortingOrder) self.banner:SetActive(false) self.liveConfig = heroConfig[config.Hero[1]] if self.liveObg then - UnLoadHerolive(self.liveConfig, self.liveObj) + UnLoadHerolive(self.liveConfig, self.liveObj, true) Util.ClearChild(self.livePos.transform) self.liveObj = nil end @@ -103,7 +103,7 @@ end --界面销毁时调用(用于子类重写) function BoxPool:OnDestroy() if self.liveObg then - UnLoadHerolive(self.liveConfig, self.liveObj) + UnLoadHerolive(self.liveConfig, self.liveObj, true) Util.ClearChild(self.live.transform) self.liveObj = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/DynamicActivityExChange.lua b/Assets/ManagedResources/~Lua/Modules/Expert/DynamicActivityExChange.lua index a54f02f3b..95a8c50ec 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/DynamicActivityExChange.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/DynamicActivityExChange.lua @@ -92,7 +92,7 @@ function ExChange:ExChangeShow() -- this.liveNode = poolManager:LoadLive(this.liveName, this.live2dRoot.transform, -- Vector3.one * exChangeConFig.HeroShowScale, Vector3.New(exChangeConFig.HeroShowLocation[1], exChangeConFig.HeroShowLocation[2],0)) if this.liveNode then - UnLoadHerolive(this.config, this.liveNode) + UnLoadHerolive(this.config, this.liveNode, true) Util.ClearChild(this.live2dRoot.transform) end this.config = heroConfig @@ -147,7 +147,7 @@ function ExChange:OnClose() -- this.liveName = nil -- end if this.liveNode then - UnLoadHerolive(this.config, this.liveNode) + UnLoadHerolive(this.config, this.liveNode, true) Util.ClearChild(this.live2dRoot.transform) end PatFaceManager.StopTimer() @@ -160,7 +160,7 @@ function ExChange:OnHide() -- this.liveName = nil -- end if this.liveNode then - UnLoadHerolive(this.config, this.liveNode) + UnLoadHerolive(this.config, this.liveNode, true) Util.ClearChild(this.live2dRoot.transform) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua index ab5d30bbc..b006ed1cd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua @@ -380,6 +380,7 @@ function this.GetGuildFightTime() end --事件触发拍脸 (如五星成长礼) function this.OnAddPatFaceData(faceConFigType, starUpGiftNum) + LogError("事件触发拍脸:"..tostring(faceConFigType)) if faceConFigType == FacePanelType.GrowGift or faceConFigType == FacePanelType.UpgradePac or faceConFigType == FacePanelType.MonsterWave or faceConFigType == FacePanelType.MainLevel or faceConFigType == FacePanelType.TimeLimitSkin then return end diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua index 597065326..fc59885d0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua @@ -357,7 +357,7 @@ end function this.ShowPanelInfo(chapterId) cutOpenIndex = chapterId if this.curheroConfig then - UnLoadHerolive(this.curheroConfig,this.curLiveObj) + UnLoadHerolive(this.curheroConfig,this.curLiveObj, true) Util.ClearChild(this.bossHerolive.transform) end this.ShowQuickBtnData() @@ -540,7 +540,7 @@ end --界面关闭时调用(用于子类重写) function GuildTranscriptMainPopup:OnClose() - UnLoadHerolive(this.curheroConfig,this.curLiveObj) + UnLoadHerolive(this.curheroConfig,this.curLiveObj, true) Util.ClearChild(this.bossHerolive.transform) end diff --git a/Assets/ManagedResources/~Lua/Modules/Hegemony/HegemonyPopup.lua b/Assets/ManagedResources/~Lua/Modules/Hegemony/HegemonyPopup.lua index 9d29d81fa..a7cc5cb3a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hegemony/HegemonyPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hegemony/HegemonyPopup.lua @@ -153,7 +153,7 @@ function HegemonyPopup:OnClose() this.alreadyChallenge:SetActive(false) this.recordBtn:SetActive(false) - UnLoadHerolive(HeroConfigData,_liveObj) + UnLoadHerolive(HeroConfigData,_liveObj, true) Util.ClearChild(this.bossIcon.transform) HeroConfigData = nil _liveObj = nil @@ -210,7 +210,7 @@ function HegemonyPopup:SetData(posInfo) end) if HeroConfigData and _liveObj then - UnLoadHerolive(HeroConfigData,_liveObj) + UnLoadHerolive(HeroConfigData,_liveObj, true) Util.ClearChild(this.bossIcon.transform) end _liveObj = LoadHerolive(HeroConfigData,this.bossIcon.transform,true) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 5c25a4f80..264fddc90 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1294,7 +1294,7 @@ function this.TimeFormat() activityTabs[k].go.gameObject:SetActive(false) else activityTabs[k].go.gameObject:SetActive(true) - LogError(""..tostring(math.ceil(GetTimeStamp() / 86400)).."/"..tostring(upGradePackagePanel)) + --LogError(""..tostring(math.ceil(GetTimeStamp() / 86400)).."/"..tostring(upGradePackagePanel)) if upGradePackagePanel ~= math.ceil(GetTimeStamp() / 86400) then upGradePackagePanel = math.ceil(GetTimeStamp() / 86400) PlayerPrefs.SetInt(PlayerManager.uid.."upGradePackagePanel",upGradePackagePanel) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua index 9e1b456af..40ec00859 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua @@ -245,7 +245,7 @@ function this.SetSelectHero() monsterId = MonsterConfig[t].MonsterId if this.hero then - UnLoadHerolive(this.hero, this.liveObj) + UnLoadHerolive(this.hero, this.liveObj, true) Util.ClearChild(this.e_heroIcon.transform) this.hero = nil end @@ -366,7 +366,7 @@ end function this:OnClose() Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointUiClear) if this.hero then - UnLoadHerolive(this.hero, this.liveObj) + UnLoadHerolive(this.hero, this.liveObj, true) Util.ClearChild(this.e_heroIcon.transform) this.hero = nil end @@ -377,7 +377,7 @@ function this:OnDestroy() herosList = {} if this.hero then - UnLoadHerolive(this.hero, this.liveObj) + UnLoadHerolive(this.hero, this.liveObj, true) Util.ClearChild(this.e_heroIcon.transform) this.hero = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskDocumentPopup.lua b/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskDocumentPopup.lua index fcec6a678..96ad3c572 100644 --- a/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskDocumentPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskDocumentPopup.lua @@ -49,7 +49,7 @@ end --界面关闭时调用(用于子类重写) function BattleOfMinskDocumentPopup:OnClose() if this.liveObj and this.config then - UnLoadHerolive(this.config, this.live) + UnLoadHerolive(this.config, this.live, true) this.liveObj = nil end end diff --git a/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskMainPanel.lua index 43b895f11..cb42a5956 100644 --- a/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Minsk/BattleOfMinskMainPanel.lua @@ -430,7 +430,7 @@ function BattleOfMinskMainPanel:OnClose() end if this.liveObj and heroConfig[curMonsterIdConFig.Boss] then - UnLoadHerolive(heroConfig[curMonsterIdConFig.Boss],this.enemyIcon) + UnLoadHerolive(heroConfig[curMonsterIdConFig.Boss],this.enemyIcon, true) this.liveObj = nil end end diff --git a/Assets/ManagedResources/~Lua/Modules/PVEActivity/ChanagePanel.lua b/Assets/ManagedResources/~Lua/Modules/PVEActivity/ChanagePanel.lua index eb46e8d4b..17343fed6 100644 --- a/Assets/ManagedResources/~Lua/Modules/PVEActivity/ChanagePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/PVEActivity/ChanagePanel.lua @@ -237,7 +237,7 @@ end --界面销毁时调用(用于子类重写) function this:OnDestroy() if liveObj then - UnLoadHerolive(liveConfig, liveObj) + UnLoadHerolive(liveConfig, liveObj, true) Util.ClearChild(this.liveMask.transform) liveObj = nil end @@ -409,7 +409,7 @@ function this.SetCardData(data) --立绘 if liveObj then - UnLoadHerolive(liveConfig, liveObj) + UnLoadHerolive(liveConfig, liveObj, true) Util.ClearChild(this.liveMask.transform) liveObj = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/PowerCenter/PowerCenterPanel.lua b/Assets/ManagedResources/~Lua/Modules/PowerCenter/PowerCenterPanel.lua index d848ae795..db3696785 100644 --- a/Assets/ManagedResources/~Lua/Modules/PowerCenter/PowerCenterPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/PowerCenter/PowerCenterPanel.lua @@ -93,6 +93,12 @@ end --界面关闭时调用(用于子类重写) function PowerCenterPanel:OnClose() + if liveObj and liveData then + UnLoadHerolive(liveData, liveObj,true) + Util.ClearChild(this.livePos.transform) + liveObj = nil + liveData = nil + end end local scrollItems = {} @@ -101,7 +107,7 @@ function PowerCenterPanel:OnDestroy() SubUIManager.Close(this.UpView) SubUIManager.Close(this.PlayerHeadFrameView) if liveObj and liveData then - UnLoadHerolive(liveData, liveObj) + UnLoadHerolive(liveData, liveObj,true) Util.ClearChild(this.livePos.transform) liveObj = nil liveData = nil @@ -116,7 +122,7 @@ end function this.SetHeroLive(data) if liveObj and liveData then - UnLoadHerolive(liveData, liveObj) + UnLoadHerolive(liveData, liveObj,true) Util.ClearChild(this.livePos.transform) liveObj = nil liveData = nil