/// <summary> /// 刷新挑战CD /// </summary> void CDUpdate() { if (AManager.CD > 0 && AManager.ChallengeTimes != 0) { m_btn_NowChalleng.gameObject.SetActive(true); m_label_NowChalleng_price.gameObject.SetActive(true); m_label_Challenge_Time.gameObject.SetActive(true); m_label_NowChalleng_price.text = string.Format("{0}", AManager.GetClearCDCost()); //暂定20 challengIntervalCoroutine = StartCoroutine(ArenaChallengInterval((int)AManager.CD)); //暂定10分钟 } else { m_btn_NowChalleng.gameObject.SetActive(false); m_label_NowChalleng_price.gameObject.SetActive(false); m_label_Challenge_Time.gameObject.SetActive(false); } }
/// <summary> /// 清挑战Cd /// </summary> void CheckAndReqClearCD() { uint cost = AManager.GetClearCDCost(); Action yes = delegate { if (MainPlayerHelper.IsHasEnoughMoney(ClientMoneyType.YuanBao, cost)) { //向服务器请求 AManager.ReqRefreshCD(); } else { //元宝不足去充值 GotoRecharge(); } }; string des = Tmger.GetLocalFormatText(LocalTextType.Arena_Commond_6, Tmger.GetCurrencyNameByType((GameCmd.MoneyType)ClientMoneyType.YuanBao), "x" + cost);//消耗{0}元宝消除冷却时间 TipsManager.Instance.ShowTipWindow(TipWindowType.YesNO, des, yes, null, title: Tmger.GetLocalText(LocalTextType.Local_TXT_Tips), okstr: Tmger.GetLocalText(LocalTextType.Local_TXT_Confirm), cancleStr: Tmger.GetLocalText(LocalTextType.Local_TXT_Cancel)); }