private IEnumerator GameStart() { ClassSingleton <QuestData> .Instance.ClearDNGDataCache(); if (DataMng.Instance().RespDataCM_Login.penaltyUserInfo != null && DataMng.Instance().RespDataCM_Login.penaltyUserInfo.penaltyLevel == "2") { RestrictionInput.SuspensionLoad(); string @string = StringMaster.GetString("PenaltyTitle"); string message = DataMng.Instance().RespDataCM_Login.penaltyUserInfo.penalty.message; AlertManager.ShowAlertDialog(delegate(int x) { this.CancelGameStart(); }, @string, message, AlertManager.ButtonActionType.Close, false); yield break; } APIUtil.Instance().alertOnlyCloseButton = true; yield return(base.StartCoroutine(StoreInit.Instance().InitRestoreOperation())); if (!Loading.IsShow()) { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); } APIUtil.Instance().alertOnlyCloseButton = false; AgreementConsent agreementConsent = new AgreementConsent(); bool isAgreement = false; yield return(base.StartCoroutine(agreementConsent.CheckAgreement(delegate(bool result) { isAgreement = result; }))); if (!isAgreement) { this.CancelGameStart(); yield break; } UpdateMasterData updateMasterData = new UpdateMasterData(); yield return(base.StartCoroutine(updateMasterData.UpdateData())); yield return(base.StartCoroutine(this.InitAssetBundleDownloadInfo())); bool tutorialStart = this.CheckFirstTutorial(); if (tutorialStart) { yield break; } bool isUpdate = this.UpdateAssetBundle(); if (isUpdate) { yield break; } ScreenController.ChangeHomeScreen(CMD_Tips.DISPLAY_PLACE.TitleToFarm); yield break; }
private void consumeProductCallBackFailed(string err) { Singleton <DebugLogScreen> .Instance.Print(err); if (++this.svRetryCt >= 3) { int numFromProductId = this.GetNumFromProductId(this._productId); this.ShowErrorDialog(err); GUICollider.EnableAllCollider("StoreUtil"); StoreInit.Instance().SetStatusToReconsume(); return; } NpSingleton <NpPurchase> .Instance.SuccessPurchase(new Action(this.consumeProductCallBackSuccess), new Action <string>(this.consumeProductCallBackFailed)); }
private void PurchaseProductCallBackFail(string err) { global::Debug.Log("================================================= STORE PP_CALLBACK --> FAILED !!"); GUICollider.EnableAllCollider("StoreUtil"); this.ShowErrorDialog(err); Singleton <DebugLogScreen> .Instance.Print(err); int num = int.Parse(err); if (num == 405) { StoreInit.Instance().SetStatusToReconsume(); } }
private void OnUpdatedDigistone(bool isSuccess) { GUIPlayerStatus.RefreshParams_S(false); this.SetDigistoneNumber(); if (!isSuccess) { if (StoreInit.STATUS.DONE_RECONSUME > StoreInit.Instance().GetStatus()) { this.ClosePanel(true); } } else if (this.closeWhenConsumed) { this.ClosePanel(true); } }
private IEnumerator InitShop(Action <int> f, float sizeX, float sizeY, float aT) { yield return(base.StartCoroutine(StoreInit.Instance().InitStore())); yield return(base.StartCoroutine(StoreInit.Instance().InitRestoreOperation())); yield return(base.StartCoroutine(StoreInit.Instance().GetProductsOperation())); if (StoreInit.Instance().IsSuccessReceiveProducts() && StoreInit.STATUS.DONE_RECONSUME <= StoreInit.Instance().GetStatus()) { if (DataMng.Instance().RespDataSH_Info.isShopMaintenance == 1) { base.SetCloseAction(f); StoreInit.Instance().SetStatusToDoneInit(); AlertManager.ShowAlertDialog(delegate(int i) { this.< ClosePanel > __BaseCallProxy0(false); }, "C-SH05"); } else if (DataMng.Instance().RespDataSH_Info.isOverDigiStone == 1) { base.SetCloseAction(f); if (AlertManager.CheckDialogMessage("C-SH06")) { AlertManager.ShowAlertDialog(delegate(int i) { this.< ClosePanel > __BaseCallProxy0(false); }, "C-SH06"); } } else { base.ShowDLG(); base.PartsTitle.SetTitle(StringMaster.GetString("ShopTitle")); this.SetDigistoneNumber(); this.SetProductScrollView(); base.Show(f, sizeX, sizeY, aT); } } else { base.SetCloseAction(f); base.ClosePanel(false); } RestrictionInput.EndLoad(); yield break; }
public IEnumerator InitRestoreOperation() { string[] productsID = null; TaskBase productsID2 = StoreInit.Instance().GetProductsID(delegate(string[] IDs) { productsID = IDs; }); productsID2.Add(new NormalTask(delegate() { if (productsID != null) { return(StoreInit.Instance().GetProducts(productsID, true)); } return(null); })).Add(new NormalTask(StoreInit.Instance().ReConsume())); return(productsID2.Run(null, null, null)); }
private IEnumerator BuyRealStone(string productId, Action <bool> onCompleted) { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); APIRequestTask apirequestTask = DataMng.Instance().RequestAgeCheck(productId, "3", false); apirequestTask.Add(new NormalTask(delegate() { if (DataMng.Instance().RespDataSH_AgeCheck.isShopMaintenance == 1) { StoreInit.Instance().SetStatusToDoneInit(); AlertManager.ShowAlertDialog(delegate(int nop) { if (null != CMD_Shop.instance) { CMD_Shop.instance.ClosePanel(true); } }, "C-SH05"); } else if (DataMng.Instance().RespDataSH_AgeCheck.isOverDigiStone == 1) { AlertManager.ShowAlertDialog(null, "C-SH06"); } else { if (DataMng.Instance().RespDataSH_AgeCheck.purchaseEnabled == 1) { return(this.StartPurchaseItem(productId, onCompleted)); } AlertManager.ShowAlertDialog(null, "C-SH04"); } return(null); })); TaskBase task = apirequestTask; if (GUIListPartsStone.< > f__mg$cache0 == null) { GUIListPartsStone.< > f__mg$cache0 = new Action(RestrictionInput.EndLoad); } return(task.Run(GUIListPartsStone.< > f__mg$cache0, delegate(Exception x) { RestrictionInput.EndLoad(); }, null)); }
private void VerifyReceiptFailed(Exception noop) { string noop2 = (noop == null) ? string.Empty : noop.Message; Singleton <DebugLogScreen> .Instance.Print(noop2); if (++this.svRetryCt < 3) { this.RequestPurchaseAndroid(); } else { global::Debug.Log("================================================= STORE VERIFY FAIL!!"); StoreInit.Instance().SetStatusToReconsume(); if (this.actCallBackReConsume != null) { this.actCallBackReConsume(false); } GUICollider.EnableAllCollider("StoreUtil"); } }
public IEnumerator GetProductsOperation() { string[] productsID = null; TaskBase productsID2 = StoreInit.Instance().GetProductsID(delegate(string[] IDs) { productsID = IDs; }); productsID2.Add(new NormalTask(delegate() { if (productsID != null) { return(StoreInit.Instance().GetProducts(productsID, false)); } return(StoreInit.Instance().GetProducts(productsID, false)); })); return(productsID2.Run(null, delegate(Exception nop) { this.getProductsSucceed = false; }, null)); }
private IEnumerator StartEvent() { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_OFF); ClassSingleton <MonsterUserDataMng> .Instance.Initialize(); GUIMonsterIcon.InitMonsterGO(Singleton <GUIMain> .Instance.transform); ClassSingleton <GUIMonsterIconList> .Instance.Initialize(); yield return(base.StartCoroutine(AssetBundleMng.Instance().WaitCacheReady())); yield return(base.StartCoroutine(StoreInit.Instance().InitStore())); this.googlePlay.Bootup(); yield return(base.StartCoroutine(this.AuthLogin())); yield return(base.StartCoroutine(APIUtil.Instance().StartGameLogin())); if (DataMng.Instance().RespDataCM_Login == null) { SoundMng.Instance().PlayBGM("BGMInternal/bgm_103/sound", 0.3f, null); this.screenCollider.playOkSE = false; this.switchTitleImage(GUIScreenTitle.TitleStete.returnVal); RestrictionInput.EndLoad(); GUIFadeControll.ActionRestart(); yield break; } this.titleState = (GUIScreenTitle.TitleStete)DataMng.Instance().RespDataCM_Login.state; this.switchTitleImage(this.titleState); GUIFadeControll.ActionRestart(); string responseContactCode = PlayerPrefs.GetString("InquiryCode", string.Empty); if (string.IsNullOrEmpty(responseContactCode)) { GameWebAPI.RequestCM_InquiryCodeRequest requestCM_InquiryCodeRequest = new GameWebAPI.RequestCM_InquiryCodeRequest(); requestCM_InquiryCodeRequest.OnReceived = delegate(GameWebAPI.InquiryCodeRequest response) { PlayerPrefs.SetString("InquiryCode", response.inquiryCode); }; GameWebAPI.RequestCM_InquiryCodeRequest request = requestCM_InquiryCodeRequest; yield return(base.StartCoroutine(request.Run(null, null, null))); } this.userID.gameObject.SetActive(true); this.userCode.gameObject.SetActive(true); this.appVersion.gameObject.SetActive(true); this.buildNumLabel.gameObject.SetActive(true); this.NpVersion.gameObject.SetActive(true); this.userCode.text = string.Format(StringMaster.GetString("TitleUserCode"), DataMng.Instance().RespDataCM_Login.playerInfo.userCode); this.appVersion.text = string.Format(StringMaster.GetString("TitleAppVersion"), VersionManager.version); GameWebAPI.RespDataCM_Login.TutorialStatus tutorialStatus = DataMng.Instance().RespDataCM_Login.tutorialStatus; if ("0" == tutorialStatus.endFlg && "0" == tutorialStatus.statusId) { this.cacheClearButtonCollider.enabled = false; this.cacheClearButtonLabel.color = Color.gray; this.cacheClearButtonLabel.effectColor = Color.gray; this.cacheClearButtonSprite.spriteName = "Common02_Btn_BaseG"; } yield return(this.backup.CheckClearMissionForGoogle()); if (GUICollider.IsAllColliderDisable()) { GUICollider.EnableAllCollider(string.Empty); } RestrictionInput.EndLoad(); if ("0" != tutorialStatus.endFlg) { CMD_BaseSelect.LoadSetting(); CMD_ChipSortModal.LoadSetting(); } yield break; }