qinglong update

dev_chengFeng
jiaoyangna 2020-08-24 19:45:18 +08:00
parent 1a72381fad
commit 1ad1aaa2d4
1 changed files with 15 additions and 15 deletions

View File

@ -169,21 +169,20 @@ function this:showRewardQinglong()
end end
end end
end end
for i = 1,#this.taskList1 do for i = 1,#this.taskList do
this.taskList1[i].gameObject:SetActive(false) this.taskList[i].gameObject:SetActive(false)
end
for i = 1,#this.taskList2 do
this.taskList2[i].gameObject:SetActive(false)
end end
local index = 1 local index = 1
for key, value in pairs(direct) do for key, value in pairs(direct) do
if not this.taskList1[index] then if not this.taskLtaskListist1[index] then
local item = SubUIManager.Open(SubUIConfig.ItemView, this.box1.transform) local item = SubUIManager.Open(SubUIConfig.ItemView, this.box1.transform)
this.taskList1[index] = item this.taskList[index] = item
end end
this.taskList1[index].gameObject:SetActive(true) this.taskList[index].gameObject:SetActive(true)
this.taskList1[index]:OnOpen(false,{key, value},0.95) this.taskList[index].gameObject.transform:SetParent(this.box1.transform)
this.taskList[index].gameObject:GetComponent("RectTransForm").localPosition = Vector3.zero
this.taskList[index]:OnOpen(false,{key, value},0.95)
index = index + 1 index = index + 1
end end
if LengthOfTable(direct) > 0 then if LengthOfTable(direct) > 0 then
@ -192,12 +191,14 @@ function this:showRewardQinglong()
Util.GetGameObject(this.Content, "empty").gameObject:SetActive(true) Util.GetGameObject(this.Content, "empty").gameObject:SetActive(true)
end end
for key, value in pairs(indirect) do for key, value in pairs(indirect) do
if not this.taskList2[index] then if not this.taskList[index] then
local item = SubUIManager.Open(SubUIConfig.ItemView, this.box2.transform) local item = SubUIManager.Open(SubUIConfig.ItemView, this.box2.transform)
this.taskList2[index] = item this.taskList[index] = item
end end
this.taskList2[index].gameObject:SetActive(true) this.taskList[index].gameObject:SetActive(true)
this.taskList2[index]:OnOpen(false,{key, value},0.95) this.taskList[index].gameObject.transform:SetParent(this.box2.transform)
this.taskList[index].gameObject:GetComponent("RectTransForm").localPosition = Vector3.zero
this.taskList[index]:OnOpen(false,{key, value},0.95)
index = index + 1 index = index + 1
end end
end end
@ -218,8 +219,7 @@ end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function this:OnDestroy() function this:OnDestroy()
this.taskList1 = {} this.taskList = {}
this.taskList2 = {}
end end
return this return this