| | |
| | | // [ Date ]: Friday, September 21, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using DG.Tweening;
|
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | [SerializeField] CheckDisplay m_CheckDisplay;
|
| | | [SerializeField] Text Money1_Text;
|
| | | [SerializeField] Text Money2_Text;
|
| | | //[SerializeField] UIEffectFly m_UIEffectFly;
|
| | | [SerializeField] Text m_Text_remainingTimes;
|
| | | [SerializeField] Button m_PromotionBtn;
|
| | | [Header("最大速度")]
|
| | | public float RollingTime = 1f;
|
| | |
|
| | | VipModel m_Vipmodel;
|
| | | VipModel vipmodel { get { return m_Vipmodel ?? (m_Vipmodel = ModelCenter.Instance.GetModel<VipModel>()); } } |
| | | WheelOfFortuneModel wheelOfFortuneModel { get { return ModelCenter.Instance.GetModel<WheelOfFortuneModel>(); } }
|
| | | private int remainingTimes = 0;//剩余次数 |
| | | private int FairyJade = 0;//获取当前绑玉 |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | |
| | | { |
| | | m_LotteryBtn.AddListener(OnClickButton); |
| | | m_Toggle.onValueChanged.AddListener(OnClickToggle); |
| | | m_PromotionBtn.AddListener(OnClickPromotionBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | Money1_Text.text = UIHelper.GetMoneyCnt(2).ToString();
|
| | | FairyJade = (int)UIHelper.GetMoneyCnt(2);
|
| | | Money1_Text.text = FairyJade.ToString();
|
| | | Money2_Text.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | m_RotatePointer.Init();
|
| | | IsLottery();//判断是否拥有次数 |
| | |
| | | }
|
| | |
|
| | | }
|
| | | private void IsButtonShow(bool _bool)
|
| | | private void OnClickPromotionBtn()
|
| | | { |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc4);
|
| | | }
|
| | | private void IsButtonShow(bool _bool)//是否可点击旋转
|
| | | {
|
| | | m_LotteryBtn.interactable = _bool;
|
| | | } |
| | | |
| | | private void IsLottery()
|
| | | {
|
| | | int LotteryNumber = vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.BindJadeWheel);
|
| | |
| | | m_LotteryBtn.interactable = false;
|
| | | }
|
| | | } |
| | | private Sequence mScoreSequence; |
| | | private void TiedJadeChange()//绑玉变化
|
| | | {
|
| | | mScoreSequence = DOTween.Sequence();
|
| | | mScoreSequence.SetAutoKill(false);
|
| | | mScoreSequence.Append(DOTween.To(delegate(float value) |
| | | {
|
| | | var temp = Math.Floor(value);
|
| | | Money1_Text.text = temp + "";
|
| | | }, FairyJade,(int)UIHelper.GetMoneyCnt(2), RollingTime));
|
| | | FairyJade = (int)UIHelper.GetMoneyCnt(2);
|
| | | } |
| | | #endregion |
| | |
|
| | | } |