qinglong commit
parent
4604d95f9d
commit
cf0747566b
|
@ -24,7 +24,8 @@ function this:InitComponent(gameObject)
|
|||
this.box1 = Util.GetGameObject(this.Content, "scroll/box")
|
||||
this.box2 = Util.GetGameObject(this.Content, "scroll2/box")
|
||||
this.tip = Util.GetGameObject(this.Content, "Text"):GetComponent("Text")
|
||||
this.taskList = {}
|
||||
this.taskList1 = {}
|
||||
this.taskList2 = {}
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -168,18 +169,21 @@ function this:showRewardQinglong()
|
|||
end
|
||||
end
|
||||
end
|
||||
for i = 1,#this.taskList do
|
||||
this.taskList[i].gameObject:SetActive(false)
|
||||
for i = 1,#this.taskList1 do
|
||||
this.taskList1[i].gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1,#this.taskList2 do
|
||||
this.taskList2[i].gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
local index = 1
|
||||
for key, value in pairs(direct) do
|
||||
if not this.taskList[index] then
|
||||
if not this.taskList1[index] then
|
||||
local item = SubUIManager.Open(SubUIConfig.ItemView, this.box1.transform)
|
||||
this.taskList[index] = item
|
||||
this.taskList1[index] = item
|
||||
end
|
||||
this.taskList[index].gameObject:SetActive(true)
|
||||
this.taskList[index]:OnOpen(false,{key, value},0.95)
|
||||
this.taskList1[index].gameObject:SetActive(true)
|
||||
this.taskList1[index]:OnOpen(false,{key, value},0.95)
|
||||
index = index + 1
|
||||
end
|
||||
if LengthOfTable(direct) > 0 then
|
||||
|
@ -188,12 +192,12 @@ function this:showRewardQinglong()
|
|||
Util.GetGameObject(this.Content, "empty").gameObject:SetActive(true)
|
||||
end
|
||||
for key, value in pairs(indirect) do
|
||||
if not this.taskList[index] then
|
||||
if not this.taskList2[index] then
|
||||
local item = SubUIManager.Open(SubUIConfig.ItemView, this.box2.transform)
|
||||
this.taskList[index] = item
|
||||
this.taskList2[index] = item
|
||||
end
|
||||
this.taskList[index].gameObject:SetActive(true)
|
||||
this.taskList[index]:OnOpen(false,{key, value},0.95)
|
||||
this.taskList2[index].gameObject:SetActive(true)
|
||||
this.taskList2[index]:OnOpen(false,{key, value},0.95)
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
|
@ -214,6 +218,8 @@ end
|
|||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function this:OnDestroy()
|
||||
this.taskList1 = {}
|
||||
this.taskList2 = {}
|
||||
end
|
||||
|
||||
return this
|
Loading…
Reference in New Issue