/// <summary> /// Payments the API finish. /// </summary> public void PaymentApiFinish() { if (GetUserApi._httpCatchData.result.is_auto_renewable == "true") { CommonConstants.IS_PREMIUM = true; //とりあえず、アイモバイルの広告全ストップ。 IMobileSdkAdsUnityPlugin.stop(); string spotId = ""; if (CommonConstants.IS_AD_TEST == true) { spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } _nendAdBanner.Pause(); _nendAdBanner.Hide(); IMobileSdkAdsUnityPlugin.stop(spotId); SceneHandleManager.NextSceneRedirect(CommonConstants.MYPAGE_SCENE); } }
/// <summary> /// Taps the this message. /// 自分と相手とのメッセージのやり取り. /// </summary> /// <param name="obj">Object.</param> public void TapThisMessage(GameObject obj) { if (_panelEazyNotifyInfiniteScroll.GetDisplayType() == "2") { HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, InformationBackButton); _backSwipe.EventMessageTarget = _informationPanel.gameObject; if (obj != null) { string id = obj.name; } if (_informationPanel != null) { if (_informationPanel.GetComponent <uTweenPosition> ().from.x == 0) { _informationPanel.GetComponent <uTweenPosition> ().from = _informationPanel.GetComponent <uTweenPosition> ().to; } _informationPanel.GetComponent <uTweenPosition> ().to = Vector3.zero; _informationPanel.GetComponent <uTweenPosition> ().ResetToBeginning(); _informationPanel.GetComponent <uTweenPosition> ().enabled = true; // 初期化処理 _informationPanelScroll.GetComponent <PanelInformationInfiniteScroll> ().Init(obj.name); } } else { _userId = obj.name; #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { if (CommonConstants.IS_PREMIUM == false) { //動画広告が何もない場合はアイモバイル、インターステシャルを表示。 if (Maio.CanShow(CommonConstants.MAIO_ZONE_ID_1) == false) { if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } } else { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); string isMovieFlag = LocalFileHandler.GetString(LocalFileConstants.MOVIE_POPUP_SHOW); if (string.IsNullOrEmpty(isMovieFlag) == true) { PanelPopupAnimate(_popupMovie); return; } else { //問答無用で動画広告を表示 AppStartLoadBalanceManager._whereFromAds = MaioMovieSdkEvent.WhereFromAds.MessageList; Maio.Show(CommonConstants.MAIO_ZONE_ID_1); return; } } } else { // IMobileSdkAdsUnityPlugin.stop(); } } #endif //審査中のときは、広告を一切挟まないので下記、処理。 HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, ChatBackButton); _backSwipe.EventMessageTarget = _panelChat.gameObject; if (obj != null) { string id = obj.name; } if (_panelChat != null) { if (_panelChat.GetComponent <uTweenPosition> ().from.x == 0) { _panelChat.GetComponent <uTweenPosition> ().from = _panelChat.GetComponent <uTweenPosition> ().to; } _panelChat.GetComponent <uTweenPosition> ().to = Vector3.zero; _panelChat.GetComponent <uTweenPosition> ().ResetToBeginning(); _panelChat.GetComponent <uTweenPosition> ().enabled = true; // 初期化処理 _panelChat.GetComponent <PanelChat> ()._maxAfterID = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeID = ""; _panelChat.GetComponent <PanelChat> ()._maxAfterIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._maxBeforeIDBackup = ""; _panelChat.GetComponent <PanelChat> ()._listUpdateDisable = false; _panelChat.GetComponent <PanelChat> ().Init(obj.name); } } }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _loadingOverlay.SetActive(true); // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得。 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーデータの取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { //_nendAdBanner.Show (); } else { _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } //審査レビューじゃない場合のみ広告表示。 if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (CommonConstants.IS_PREMIUM == false) { // 広告の取得、表示処理 if (CommonConstants.IS_AD_TEST == true) { //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } } else { IMobileSdkAdsUnityPlugin.stop(); } #endif } //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverlay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータの取得 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); if (LocalFileHandler.GetBool(LocalFileConstants.TUTORIAL_MATCHING_KEY) == false) { _tutorial.SetActive(true); } else { _tutorial.SetActive(false); } _isStart = true; _loadingOverlay.SetActive(false); yield break; }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { _coverOrProf = CoverOrProfType.None; _time = 0; _tmpText.text = LocalMsgConst.TITLE_MYPAGE; _loadingOverlay.SetActive(true); //アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで //static変数のデータが消え去ってしまうみたいなのでリカバー if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true) { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); //ファイルが作成されるまでポーリングして処理待ち while (System.IO.File.Exists(_commonFileName) == false) { yield return(System.IO.File.Exists(_commonFileName) == true); } //ここでユーザーキーを取得。 AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY); #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif } //ユーザーの取得。 new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } if (GetUserApi._httpCatchData.result.is_auto_renewable == "true") { CommonConstants.IS_PREMIUM = true; } else { CommonConstants.IS_PREMIUM = false; } PremiumPushPanel.Instance.Init(); //性別が取得出来ていない場合の処理。 if (GetUserApi._httpCatchData.result.user.sex_cd == "0") { PanelGenderSelectCommon.Instance.Init(); //性別選択のUIを表示。 _loadingOverlay.SetActive(false); yield break; } AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd; ///メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); ///強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadingOverlay.SetActive(false); yield break; } ///アプリポップアップレビューの立ち上げ処理。 AppliEventController.Instance.AppliReview(); //マスターデータの取得。 if (InitDataApi._httpCatchData == null) { new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } } //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。 if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 AppStartLoadBalanceManager._isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 AppStartLoadBalanceManager._isBaseProfile = false; } //こっからプッシュ飛んできた時の処理。 if (NotificationRecieveManager._isCatch == true) { switch (AppStartLoadBalanceManager._toScenePanel) { case CommonConstants.VIEW_HISTORY: HeaderPanel.Instance.BackButtonSwitch(false); HeaderPanel.Instance.BackButtonSwitch(true, HistoryListCloseEvent); _tmpText.text = LocalMsgConst.TITLE_HISTORY; PaneHistory.Instance.Init(); PanelAnimate(_paneHistory); _paneHistory.GetComponent <BoxCollider2D> ().enabled = false; break; } NotificationRecieveManager._isCatch = false; yield break; } //ヘッダーパネル初期化 PanelStateManager.InitPanelSet(); //データの初期化等 DataInit(); //シーンの最初に表示する箇所、初期化。 PanelMypageMain.Instance.Init(); //審査レビューじゃない場合のみ広告表示。 if (GetUserApi._httpCatchData.result.review == "false") { #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR //有料会員か? if (CommonConstants.IS_PREMIUM == false) { // 広告の取得、表示処理 string spotId = ""; if (CommonConstants.IS_AD_TEST == true) { spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.show(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } if (AppStartLoadBalanceManager.m_NendAdFullBoard != null) { AppStartLoadBalanceManager.m_NendAdFullBoard.Load(); AppStartLoadBalanceManager.m_NendAdFullBoard.Show(); } if (_isUnserBanner == false) { _imobileBannerViewId = IMobileSdkAdsUnityPlugin.show( spotId, IMobileSdkAdsUnityPlugin.AdType.BANNER, IMobileSdkAdsUnityPlugin.AdAlignPosition.CENTER, IMobileSdkAdsUnityPlugin.AdValignPosition.BOTTOM, true ); _isUnserBanner = true; } //_nendAdBanner.Show (); } else { Debug.Log(" i-mobile LOG: => Start This is Premium"); string spotId = ""; if (CommonConstants.IS_AD_TEST == true) { spotId = CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); } else { spotId = CommonConstants.IMOBILE_BANNER_SPOT_ID; //インタースティシャル広告 IMobileSdkAdsUnityPlugin.stop(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); } //バナー広告隠す処理。 IMobileSdkAdsUnityPlugin.setVisibility(_imobileBannerViewId, false); //有料会員のため、広告ストップ IMobileSdkAdsUnityPlugin.stop(spotId); _nendAdBanner.Pause(); _nendAdBanner.Hide(); Destroy(_nendAdBanner.gameObject); } #endif } _loadingOverlay.SetActive(false); yield break; }