【升星有理】

dev_chengFeng
ZhangBiao 2021-06-18 17:29:00 +08:00
parent 15172dab87
commit 165a724ba3
1 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,6 @@ end
--移除事件监听(用于子类重写) --移除事件监听(用于子类重写)
function ShengXingYouLi:RemoveListener() function ShengXingYouLi:RemoveListener()
end end
local sortingOrder = 0
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function ShengXingYouLi:OnOpen(_activityConfig,_index,parent) function ShengXingYouLi:OnOpen(_activityConfig,_index,parent)
self.actConfig = _activityConfig self.actConfig = _activityConfig
@ -48,7 +47,7 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ShengXingYouLi:OnShow(_sortingOrder) function ShengXingYouLi:OnShow(_sortingOrder)
sortingOrder = _sortingOrder self.sortingOrder = _sortingOrder
self.gameObject:SetActive(true) self.gameObject:SetActive(true)
self.actId = self.actConfig.ActId self.actId = self.actConfig.ActId
@ -122,7 +121,7 @@ function ShengXingYouLi:SingleDataShow(pre,value)
end end
for i = 1, #shows do for i = 1, #shows do
if itemsGrid[pre][i] then if itemsGrid[pre][i] then
itemsGrid[pre][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,sortingOrder) itemsGrid[pre][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,self.sortingOrder)
itemsGrid[pre][i].gameObject:SetActive(true) itemsGrid[pre][i].gameObject:SetActive(true)
end end
end end
@ -138,7 +137,7 @@ function ShengXingYouLi:SingleDataShow(pre,value)
obj.gameObject:SetActive(true) obj.gameObject:SetActive(true)
end end
for i = 1, #shows do for i = 1, #shows do
itemsGrid[pre][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,sortingOrder) itemsGrid[pre][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,self.sortingOrder)
itemsGrid[pre][i].gameObject:SetActive(true) itemsGrid[pre][i].gameObject:SetActive(true)
end end
end end
@ -195,6 +194,7 @@ function ShengXingYouLi:SetTime()
end end
function ShengXingYouLi:OnClose() function ShengXingYouLi:OnClose()
self.gameObject:SetActive(false)
if self.timer then if self.timer then
self.timer:Stop() self.timer:Stop()
self.timer = nil self.timer = nil