【牛转乾坤】特效代码提交

dev_chengFeng
ZhangBiao 2021-01-26 10:33:18 +08:00
parent 9e14cada49
commit 3d72bd510a
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@ function NiuZhuanQianKun:InitComponent()
this.rollBtn = Util.GetGameObject(self.gameObject,"rollBtn") this.rollBtn = Util.GetGameObject(self.gameObject,"rollBtn")
this.center = Util.GetGameObject(self.gameObject,"center") this.center = Util.GetGameObject(self.gameObject,"center")
this.tip = Util.GetGameObject(self.gameObject,"tip"):GetComponent("Text") this.tip = Util.GetGameObject(self.gameObject,"tip"):GetComponent("Text")
this.effect = Util.GetGameObject(self.gameObject,"UI_Effect_MianBan_NiuZhuanQianKun")
for i = 1, 8 do for i = 1, 8 do
rewardList[i] = Util.GetGameObject(self.gameObject,"center/reward"..i) rewardList[i] = Util.GetGameObject(self.gameObject,"center/reward"..i)
textList[i] = Util.GetGameObject(rewardList[i],"Text") textList[i] = Util.GetGameObject(rewardList[i],"Text")
@ -77,6 +78,8 @@ function NiuZhuanQianKun:RemoveListener()
end end
function NiuZhuanQianKun:OnSortingOrderChange() function NiuZhuanQianKun:OnSortingOrderChange()
Util.AddParticleSortLayer(this.effect, self.sortingOrder - _sortingOrder)
_sortingOrder = self.sortingOrder
end end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
@ -132,6 +135,7 @@ end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function NiuZhuanQianKun:OnDestroy() function NiuZhuanQianKun:OnDestroy()
_sortingOrder = 0
rewardList = {} rewardList = {}
textList = {} textList = {}
imgList = {} imgList = {}