四灵提交
parent
e950d3d45a
commit
d5c6d690b0
|
@ -56,6 +56,9 @@ function this:BtnClick(i)
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
friendHelpHeros = MonsterCampManager.GetFriendHelpHeros(curType)
|
friendHelpHeros = MonsterCampManager.GetFriendHelpHeros(curType)
|
||||||
end
|
end
|
||||||
|
for k,v in pairs(itemList) do
|
||||||
|
v.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
this:RefreshItemData()
|
this:RefreshItemData()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -115,6 +118,7 @@ function this:RefreshItemData()
|
||||||
this.ScrollView:SetData(data,function(index,go)
|
this.ScrollView:SetData(data,function(index,go)
|
||||||
--this:SetSingleData(index,go,data[index])
|
--this:SetSingleData(index,go,data[index])
|
||||||
LogGreen(go.name)
|
LogGreen(go.name)
|
||||||
|
go.gameObject:SetActive(true)
|
||||||
local tempData = FourTrailSingleHelpHero:New(go)
|
local tempData = FourTrailSingleHelpHero:New(go)
|
||||||
tempData:OnOpen(curIndex,data[index],curType,heightPower)
|
tempData:OnOpen(curIndex,data[index],curType,heightPower)
|
||||||
local tempId = curIndex == 1 and data[index].hero.dynamicId or data[index].dynamicId
|
local tempId = curIndex == 1 and data[index].hero.dynamicId or data[index].dynamicId
|
||||||
|
@ -123,11 +127,14 @@ function this:RefreshItemData()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnClose()
|
function this:OnClose()
|
||||||
tabs = {}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnDestroy()
|
function this:OnDestroy()
|
||||||
tabs = {}
|
tabs = {}
|
||||||
|
if this.ScrollView then
|
||||||
|
SubUIManager.Close(this.ScrollView)
|
||||||
|
this.ScrollView = nil
|
||||||
|
end
|
||||||
itemList = {}
|
itemList = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
|
||||||
FourTrailSingleHelpHero = {}
|
FourTrailSingleHelpHero = {}
|
||||||
|
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
function FourTrailSingleHelpHero:New(gameObject)
|
function FourTrailSingleHelpHero:New(gameObject)
|
||||||
local b = {}
|
local b = {}
|
||||||
b.gameObject = gameObject
|
b.gameObject = gameObject
|
||||||
|
@ -135,6 +135,7 @@ end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
function FourTrailSingleHelpHero:OnDestroy()
|
function FourTrailSingleHelpHero:OnDestroy()
|
||||||
|
self = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue