隐藏不显示的预设

dev_chengFeng
jiaoyangna 2021-06-18 11:03:51 +08:00
parent 65c09118ed
commit 8b55bf1dc1
1 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,10 @@ function this:OnShow(_parent,...)
return a.sort < b.sort
end)
local index = 0
for k,m in pairs(itemList) do
itemList[k].item.gameObject:SetActive(false)
end
for k,m in pairs(data) do
index = index + 1
if not itemList[k] then
@ -100,6 +104,7 @@ function this:OnShow(_parent,...)
itemList[k].k[2] = Util.GetGameObject(itemList[k].item, "k2")
itemList[k].k[3] = Util.GetGameObject(itemList[k].item, "k3")
end
itemList[k].item.gameObject:SetActive(true)
if index == LengthOfTable(data) then
Util.GetGameObject(itemList[k].item, "Image (4)").gameObject:SetActive(false)
else