【牛转钱坤】增加红点

dev_chengFeng
ZhangBiao 2021-01-28 15:03:16 +08:00
parent eadc022522
commit 6e56b2862c
1 changed files with 4 additions and 0 deletions

View File

@ -458,6 +458,7 @@ function this:InitComponent()
--牛转乾坤
this.btnNiuZhuan = Util.GetGameObject(self.gameObject, "RightUp/NiuZhuan")
this.NiuZhuanTime = Util.GetGameObject(this.btnNiuZhuan, "time"):GetComponent("Text")
this.NiuZhuanRedPoint = Util.GetGameObject(this.btnNiuZhuan, "redPoint")
end
function this:SetPosFunc(v2)
@ -1626,6 +1627,9 @@ function this.TimeFormat()
if NiuZhuanEndTime > 0 then
this.NiuZhuanTime.text = TimeToFelaxible(NiuZhuanEndTime)
this.btnNiuZhuan:SetActive(true)
local canGet = BagManager.GetTotalItemNum(1221) > 0 and BagManager.GetTotalItemNum(1222) > 0 and
BagManager.GetTotalItemNum(1223) > 0 and BagManager.GetTotalItemNum(1224) > 0
this.NiuZhuanRedPoint:SetActive(canGet)
else
this.btnNiuZhuan:SetActive(false)
end