刷冲特权添加开启条件
parent
b32a8c4625
commit
07d9fd4647
|
@ -30,6 +30,7 @@ function GMShuaChongTeQuan:InitComponent()
|
||||||
self.grid = Util.GetGameObject(self.gameObject, "grid")
|
self.grid = Util.GetGameObject(self.gameObject, "grid")
|
||||||
self.titleImg=Util.GetGameObject(self.gameObject, "bg1/shenzuntequanName"):GetComponent("Image")
|
self.titleImg=Util.GetGameObject(self.gameObject, "bg1/shenzuntequanName"):GetComponent("Image")
|
||||||
self.btn_buy=Util.GetGameObject(self.gameObject, "bg1/bg2/btn_buy")
|
self.btn_buy=Util.GetGameObject(self.gameObject, "bg1/bg2/btn_buy")
|
||||||
|
self.hintTxt=Util.GetGameObject(self.gameObject, "bg1/bg2/hintTxt"):GetComponent("Text")
|
||||||
self.tabBox = Util.GetGameObject(self.gameObject, "TabBox")
|
self.tabBox = Util.GetGameObject(self.gameObject, "TabBox")
|
||||||
self.infoGrid=Util.GetGameObject(self.gameObject, "bg1/bg2/info/tequan")
|
self.infoGrid=Util.GetGameObject(self.gameObject, "bg1/bg2/info/tequan")
|
||||||
self.infoPre=Util.GetGameObject(self.gameObject, "bg1/bg2/tequanText")
|
self.infoPre=Util.GetGameObject(self.gameObject, "bg1/bg2/tequanText")
|
||||||
|
@ -64,6 +65,21 @@ function GMShuaChongTeQuan:InitComponent()
|
||||||
elseif state==2 then
|
elseif state==2 then
|
||||||
self.payTxt.text="已领取"
|
self.payTxt.text="已领取"
|
||||||
end
|
end
|
||||||
|
if _index>1 then
|
||||||
|
local lastId=_TabData[_index-1].id
|
||||||
|
local lastmiss=ActivityGiftManager.GetActivityInfo(ActivityTypeDef.shuaChongTeQuan,lastId)
|
||||||
|
local lastState=lastmiss.state
|
||||||
|
if lastState==0 then
|
||||||
|
self.btn_buy:SetActive(false)
|
||||||
|
self.hintTxt.gameObject:SetActive(true)
|
||||||
|
self.hintTxt.text="开通".._TabData[_index-1].name.."解锁购买"
|
||||||
|
else
|
||||||
|
self.btn_buy:SetActive(true)
|
||||||
|
self.hintTxt.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.hintTxt.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
Util.AddOnceClick(self.btn_buy,function()
|
Util.AddOnceClick(self.btn_buy,function()
|
||||||
if state==0 then
|
if state==0 then
|
||||||
PayManager.Pay(recharge.Id, function()
|
PayManager.Pay(recharge.Id, function()
|
||||||
|
|
Loading…
Reference in New Issue