From d5c6d690b0c01d452595be81af52b4f96e5583d6 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 4 Feb 2021 17:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/GeneralBigPopup_FourElementHelpFight.lua | 9 ++++++++- .../~Lua/View/FourTrailSingleHelpHero.lua | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua index ab7b637287..b6a167d9f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_FourElementHelpFight.lua @@ -56,6 +56,9 @@ function this:BtnClick(i) if i == 1 then friendHelpHeros = MonsterCampManager.GetFriendHelpHeros(curType) end + for k,v in pairs(itemList) do + v.gameObject:SetActive(false) + end this:RefreshItemData() end @@ -115,6 +118,7 @@ function this:RefreshItemData() this.ScrollView:SetData(data,function(index,go) --this:SetSingleData(index,go,data[index]) LogGreen(go.name) + go.gameObject:SetActive(true) local tempData = FourTrailSingleHelpHero:New(go) tempData:OnOpen(curIndex,data[index],curType,heightPower) local tempId = curIndex == 1 and data[index].hero.dynamicId or data[index].dynamicId @@ -123,11 +127,14 @@ function this:RefreshItemData() end function this:OnClose() - tabs = {} end function this:OnDestroy() tabs = {} + if this.ScrollView then + SubUIManager.Close(this.ScrollView) + this.ScrollView = nil + end itemList = {} end diff --git a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua index e6a4403b63..13f7a158b8 100644 --- a/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua +++ b/Assets/ManagedResources/~Lua/View/FourTrailSingleHelpHero.lua @@ -1,6 +1,6 @@ -local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) + FourTrailSingleHelpHero = {} - +local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) function FourTrailSingleHelpHero:New(gameObject) local b = {} b.gameObject = gameObject @@ -135,6 +135,7 @@ end --界面销毁时调用(用于子类重写) function FourTrailSingleHelpHero:OnDestroy() + self = nil end