| | |
| | | [SerializeField] Image[] m_ItemGotSigns;
|
| | | [SerializeField] Text m_Recharge;
|
| | | [SerializeField] Button m_Func;
|
| | | [SerializeField] Text m_FuncBtnTxt;
|
| | | [SerializeField] Button m_GetReward;
|
| | | [SerializeField] Text m_GetRewardBtnTxt;
|
| | | [SerializeField] RectTransform m_ContaienrLess;
|
| | | [SerializeField] AccumulateRechargeBehaviour[] m_AccumulateRecharges;
|
| | | [SerializeField] RectTransform m_ContainerMore;
|
| | |
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Func.onClick.AddListener(OnFunc);
|
| | | m_GetReward.onClick.AddListener(GetReward);
|
| | | m_ScrollerControl.OnRefreshCell += OnRefreshCell;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void OnFunc()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | |
|
| | | private void GetReward()
|
| | | {
|
| | | OperationBase operationBase;
|
| | | OperationAccumulateRecharge.Recharge recharge = null;
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.AccumulateRecharge, out operationBase))
|
| | |
| | | if (model.SatisfyGetReward(recharge))
|
| | | {
|
| | | model.GetAccumulateRechargeReward(recharge);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_ItemGotSigns[i].gameObject.SetActive(recharge != null && model.IsRewardGot(recharge));
|
| | | }
|
| | | m_GetReward.gameObject.SetActive(true);
|
| | | m_Func.gameObject.SetActive(true);
|
| | | if (recharge == null)
|
| | | {
|
| | | m_Func.gameObject.SetActive(false);
|
| | | m_GetReward.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | if (model.IsRewardGot(recharge))
|
| | | {
|
| | | m_Func.SetInteractable(m_FuncBtnTxt, false);
|
| | | m_FuncBtnTxt.text = Language.Get("AccumulateRecharge_Got");
|
| | | m_GetReward.SetInteractable(m_GetRewardBtnTxt, false);
|
| | | m_GetRewardBtnTxt.text = Language.Get("AccumulateRecharge_Got");
|
| | | m_Func.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | m_Func.SetInteractable(m_FuncBtnTxt, true);
|
| | | if (model.SatisfyGetReward(recharge))
|
| | | {
|
| | | m_FuncBtnTxt.text = Language.Get("AccumulateRecharge_GetReward");
|
| | | m_GetReward.SetInteractable(m_GetRewardBtnTxt, true);
|
| | | m_GetRewardBtnTxt.color = UIHelper.GetUIColor(TextColType.LightYellow);
|
| | | m_Func.gameObject.SetActive(false);
|
| | | m_GetRewardBtnTxt.text = Language.Get("AccumulateRecharge_GetReward");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FuncBtnTxt.text = Language.Get("AccumulateRecharge_Recharge");
|
| | | m_GetReward.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.AccumulateRecharge, out operationBase))
|
| | | {
|
| | | OperationAccumulateRecharge operation = operationBase as OperationAccumulateRecharge;
|
| | | m_Time.text = operation.ToDisplayTime();
|
| | | m_Time.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"),
|
| | | UIHelper.GetTextColorByItemColor(TextColType.Green, operation.ToDisplayTime()));
|
| | | }
|
| | | }
|
| | |
|