| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | |
| | | [SerializeField] CheckDisplay m_CheckDisplay;
|
| | | [SerializeField] Text Money1_Text;
|
| | | [SerializeField] Text Money2_Text;
|
| | | [SerializeField] Text m_Text_remainingTimes;
|
| | | [SerializeField] Text m_Text_remainingTimes;//剩余转动次数
|
| | | [SerializeField] Text m_Text_VIPuP;//VIP提升转动次数
|
| | | [SerializeField] Text m_GO;
|
| | | [SerializeField] Button m_PromotionBtn; |
| | | [SerializeField] RotationTween m_RotationTween; |
| | | [SerializeField] GameObject m_RequiredConsumption;
|
| | |
| | | m_LotteryBtn.interactable = true;
|
| | | m_RequiredConsumption.SetActive(true);
|
| | | m_LotteryImage.gray = false;
|
| | | TextGo();
|
| | | IncreaseInFrequency();//次数提升
|
| | | RemainingTimes();//剩余次数 |
| | | }
|
| | | protected override void OnActived()
|
| | |
| | | {
|
| | | if (obj == PlayerDataRefresh.VIPLv)
|
| | | {
|
| | | TextGo();
|
| | | RemainingTimes();//剩余次数
|
| | | IncreaseInFrequency();//次数提升
|
| | | }
|
| | | if (obj == PlayerDataRefresh.Gold)
|
| | | {
|
| | |
| | | m_RequiredConsumption.SetActive(false);
|
| | | m_LotteryImage.gray = true;
|
| | | m_RotatePointer.SetTime(m_Toggle.isOn);
|
| | | TextGo();
|
| | | RemainingTimes();//剩余次数
|
| | | IncreaseInFrequency();//次数提升
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | |
| | | }
|
| | | private void OnClickPromotionBtn()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | }
|
| | | |
| | | }
|
| | | private void IsButtonShow(bool _bool)//是否可点击旋转
|
| | | {
|
| | |
| | | |
| | | private void LackOfVIP()//VIP 不足
|
| | | {
|
| | | string str = "次数不足,请提升VIP";
|
| | | string str = Language.Get("Turntable_2");
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), str, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | if (LotteryNumber > wheelOfFortuneModel.Number)
|
| | | {
|
| | | m_Text_remainingTimes.text = "今日可转动次数:" + (LotteryNumber - wheelOfFortuneModel.Number);
|
| | | m_Text_remainingTimes.text =(LotteryNumber - wheelOfFortuneModel.Number).ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_remainingTimes.text = "今日可转动次数:0";
|
| | | m_Text_remainingTimes.text = 0.ToString();
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | |
| | | private void IncreaseInFrequency()//次数提升
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | m_Text_VIPuP.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_VIPuP.gameObject.SetActive(true);
|
| | | }
|
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | | for (int i = 0; i <= 10; i++)
|
| | | {
|
| | | var VipConfig = VipPrivilegeConfig.GetVipPrivilegeData(VipPrivilegeType.BindJadeWheel, i);
|
| | | if (VipConfig != 0 && VipConfig > LotteryNumber)
|
| | | {
|
| | | int type = i;
|
| | | int number = VipConfig - LotteryNumber;
|
| | | m_Text_VIPuP.text = string.Format(Language.Get("Turntable_1"), type, Number(number));
|
| | | return;
|
| | | }
|
| | | }
|
| | | } |
| | | private string Number(int number)
|
| | | {
|
| | | string Str = string.Empty;
|
| | | switch (number)
|
| | | {
|
| | | case 1:
|
| | | Str = Language.Get("Num_CHS_1");
|
| | | return Str;
|
| | | case 2:
|
| | | Str = Language.Get("Num_CHS_2");
|
| | | return Str;
|
| | | case 3:
|
| | | Str = Language.Get("Num_CHS_3");
|
| | | return Str;
|
| | | case 4:
|
| | | Str = Language.Get("Num_CHS_4");
|
| | | return Str;
|
| | | case 5:
|
| | | Str = Language.Get("Num_CHS_5");
|
| | | return Str;
|
| | | case 6:
|
| | | Str = Language.Get("Num_CHS_6");
|
| | | return Str;
|
| | | case 7:
|
| | | Str = Language.Get("Num_CHS_7");
|
| | | return Str;
|
| | | case 8:
|
| | | Str = Language.Get("Num_CHS_8");
|
| | | return Str;
|
| | | case 9:
|
| | | Str = Language.Get("Num_CHS_9");
|
| | | return Str;
|
| | | case 10:
|
| | | Str = Language.Get("Num_CHS_10");
|
| | | return Str;
|
| | | }
|
| | | return Str;
|
| | | } |
| | | |
| | | private void TextGo()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.VIPLv >= 10)
|
| | | {
|
| | | m_GO.text = Language.Get("Turntable_4");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_GO.text = Language.Get("Turntable_3");
|
| | | }
|
| | | } |
| | | #endregion |
| | |
|
| | | } |