private void Start() { this.host = this._client.Host; this.port = this._client.Port; this._loadingWheelDialogContext = new LoadingWheelWidgetContext(); this._status = Status.Normal; }
private void RequestToEnterLevel() { this._loadingWheelDialogContext = new LoadingWheelWidgetContext(); this._loadingWheelDialogContext.ignoreMaxWaitTime = true; Singleton <MainUIManager> .Instance.ShowWidget(this._loadingWheelDialogContext, UIType.Any); Singleton <NetworkManager> .Instance.RequestEndlessLevelBeginReq(); }
private void ShowWheel() { LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x3b, null) { ignoreMaxWaitTime = true }; Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); }
public void CheckReceipt() { if (!string.IsNullOrEmpty(this.GetReceipt()) && (this._loadingWheelDialogContext == null)) { LoadingWheelWidgetContext context = new LoadingWheelWidgetContext { ignoreMaxWaitTime = true }; this._loadingWheelDialogContext = context; Singleton <MainUIManager> .Instance.ShowWidget(this._loadingWheelDialogContext, UIType.Any); } }
private void OnOkBtnClick() { LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x6b, null) { ignoreMaxWaitTime = true }; Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); Singleton <NetworkManager> .Instance.RequestAvatarRevive(false); }
private void DoStartPowerup() { this._storageItemBeforePowerup = this.storageItem.Clone(); LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x20, null) { ignoreMaxWaitTime = true }; Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); Singleton <NetworkManager> .Instance.RequestEquipmentPowerUp(this.storageItem, this._resourceList); }
private void SyncRequestLevelEnd() { LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x90, null) { ignoreMaxWaitTime = true }; Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); if (!Singleton <LevelScoreManager> .Instance.RequestLevelEnd()) { widget.Finish(); } }
protected override bool SetupView() { DateTime now = TimeUtil.Now; this._dayNum = (int)this._signInRewardStatus.get_next_sign_in_day(); this._monthNum = now.Month; this._daysOfMonth = DateTime.DaysInMonth(now.Year, now.Month); this._signInRewardItemList = new List <RewardData>(); if ((this._monthNum % 2) == 0) { List <EvenSignInRewardMetaData> itemList = EvenSignInRewardMetaDataReader.GetItemList(); for (int i = 0; i < itemList.Count; i++) { if (i >= this._daysOfMonth) { break; } EvenSignInRewardMetaData data = itemList[i]; this._signInRewardItemList.Add(RewardDataReader.GetRewardDataByKey(data.rewardItemID)); } } else { List <OddSignInRewardMetaData> list2 = OddSignInRewardMetaDataReader.GetItemList(); for (int j = 0; j < list2.Count; j++) { if (j >= this._daysOfMonth) { break; } OddSignInRewardMetaData data2 = list2[j]; this._signInRewardItemList.Add(RewardDataReader.GetRewardDataByKey(data2.rewardItemID)); } } base.view.transform.Find("Dialog/Content/Title/Month").GetComponent <Text>().text = LocalizationGeneralLogic.GetText(MiscData.Config.MonthTextIDList[this._monthNum], new object[0]); base.view.transform.Find("Dialog/Content/Title/DayNum").GetComponent <Text>().text = this._dayNum.ToString(); base.view.transform.Find("Dialog/Content/MonthPanel").gameObject.SetActive(false); base.view.transform.Find("Dialog/Content/GetRewardBtn").gameObject.SetActive(false); if ((this._signInRewardStatus == null) || (this._signInRewardStatus.get_retcode() != null)) { LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x7a, null); Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); } else { this.SetupTheRewardPanel(); } return(false); }
public void OnPurchaseCallback(PayResult payResult) { bool flag = false; if (Singleton <AccountManager> .Instance.accountConfig.paymentBranch == ConfigAccount.PaymentBranch.APPSTORE_CN) { MonoStoreKitEventListener.IAP_PURCHASE_CALLBACK = null; ApplePayResult result = (ApplePayResult)payResult; if (result.payRetCode == PayResult.PayRetcode.CANCELED) { flag = true; } else if (result.payRetCode == PayResult.PayRetcode.FAILED) { flag = true; Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("IAPTransitionFailed", new object[0]), 2f), UIType.Any); } else if (result.payRetCode == PayResult.PayRetcode.CONFIRMING) { flag = true; } else if (result.payRetCode != PayResult.PayRetcode.SUCCESS) { flag = true; } } else if ((payResult.payRetCode != PayResult.PayRetcode.SUCCESS) && (payResult.payRetCode != PayResult.PayRetcode.CONFIRMING)) { if (payResult.payRetCode == PayResult.PayRetcode.CANCELED) { flag = true; } else if (payResult.payRetCode == PayResult.PayRetcode.FAILED) { flag = true; Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(payResult.GetResultShowText(), 2f), UIType.Any); } else { flag = true; } } if (flag && (this._loadingWheelDialogContext != null)) { this._loadingWheelDialogContext.Finish(); this._loadingWheelDialogContext = null; } }
private void SetupTheRewardPanel() { if (this._signInRewardStatus == null) { LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x7a, null); Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any); } else { base.view.transform.Find("Dialog/Content/MonthPanel").gameObject.SetActive(true); base.view.transform.Find("Dialog/Content/GetRewardBtn").gameObject.SetActive(true); MonoGridScroller component = base.view.transform.Find("Dialog/Content/MonthPanel/ScrollView").GetComponent <MonoGridScroller>(); int num = ((this._daysOfMonth % 6) != 0) ? ((this._daysOfMonth / 6) + 1) : (this._daysOfMonth / 6); int num2 = (int)((this._signInRewardStatus.get_next_sign_in_day() - 1) / 6); component.Init(new MonoGridScroller.OnChange(this.OnScrollerChanged), this._signInRewardItemList.Count, new Vector2(0f, 1f - (((float)num2) / ((float)num)))); } }
private bool OnRechargeSuccNotify(RechargeFinishNotify rsp) { if (this._loadingWheelDialogContext != null) { this._loadingWheelDialogContext.Finish(); this._loadingWheelDialogContext = null; } if ((rsp.get_retcode() == null) || ((rsp.get_retcode() == 2) && !string.IsNullOrEmpty(this.GetReceipt()))) { RechargeDataItem storeItemByProductID = this.GetStoreItemByProductID(rsp.get_product_name()); string str = (storeItemByProductID == null) ? string.Empty : storeItemByProductID.productName; int num = (int)(rsp.get_pay_hcoin() + rsp.get_free_hcoin()); GeneralConfirmDialogContext dialogContext = new GeneralConfirmDialogContext { type = GeneralConfirmDialogContext.ButtonType.SingleButton }; object[] replaceParams = new object[] { str, num }; dialogContext.desc = LocalizationGeneralLogic.GetText("IAPTransitionSuccess", replaceParams); if (< > f__am$cache8 == null) {