四灵提交

dev_chengFeng
jiaoyangna 2021-02-04 17:41:44 +08:00
parent e950d3d45a
commit d5c6d690b0
2 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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