public static void SwitchProduction() { LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.PRODUCTION); LocalFileHandler.Flush(); Debug.Log("サーバーを本番環境マシンに設定しました"); }
public static void SwitchStaging() { LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.STG); LocalFileHandler.Flush(); Debug.Log("サーバーをステージング環境マシンに設定しました"); }
public static void SwitchLocal() { string s = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME); LocalFileHandler.SetInt(LocalFileConstants.EDITOR_ONLY_DOMAIN_SWICHER, (int)SeverMachineType.LOCAL); LocalFileHandler.Flush(); Debug.Log("サーバーをローカルマシンに設定しました"); }
/// <summary> /// News the message. /// </summary> /// <returns>The message.</returns> public void NewMessage() { string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); LocalFileHandler.SetString(LocalFileConstants.FROM_MYPAGE_SCENE, CommonConstants.MYPAGE_SCENE); LocalFileHandler.Flush(); SceneHandleManager.NextSceneRedirect(CommonConstants.MESSAGE_SCENE); }
/// <summary> /// Movies the popup dont show button. /// この警告を2度と表示しない /// </summary> public void MoviePopupDontShowButton() { //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- string commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(commonFileName); LocalFileHandler.SetString(LocalFileConstants.MOVIE_POPUP_SHOW, "1"); LocalFileHandler.Flush(); PanelPopupCloseAnimate(_popupMovie); }
/// <summary> /// Popups the close. /// レビューをしない時の処理。 /// </summary> /// <returns>The close.</returns> public void PopupClose() { //if (_isNotShowToggle.isOn == true) //{ //ここでアプリレビューキーを保存 LocalFileHandler.SetString(LocalFileConstants.APPLI_REVIEW_POPUP_SHOW, "1"); LocalFileHandler.Flush(); //} StartCoroutine(PopupCloseCoroutine()); }
/// <summary> /// Ienums the set data. /// </summary> /// <returns>The set data.</returns> private IEnumerator IenumSetData() { 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); } SearchEventManager.Instance._order = _orderAPIThrow; SearchEventManager.Instance._sex = _sexAPIThrow; SearchEventManager.Instance._ageTo = _ageHighAPIThrow; SearchEventManager.Instance._ageFrom = _ageLowAPIThrow; SearchEventManager.Instance._heightTo = _heightToAPIThrow; SearchEventManager.Instance._heightFrom = _heightFromAPIThrow; SearchEventManager.Instance._bodyType = _bodyTypeAPIThrow; SearchEventManager.Instance._isImage = _isImageAPIThrow; SearchEventManager.Instance._radius = _radiusAPIThrow; SearchEventManager.Instance._keyword = _keyword.text; SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; Debug.Log(condition._isImage + " 画像の有無で検索。 "); Debug.Log(condition._radius + " 距離で検索 "); Debug.Log(condition._keyword + " キ=ワードで検索 "); LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); Debug.Log(" 検索条件を保存。 "); }
/// <summary> /// Sets the data. /// マスターデータから動的に値が変更する所用 /// </summary> public void SetData() { //StartCoroutine(IenumSetData ()); string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); SearchEventManager.Instance._order = _orderAPIThrow; SearchEventManager.Instance._sex = _sexAPIThrow; SearchEventManager.Instance._ageTo = _ageHighAPIThrow; SearchEventManager.Instance._ageFrom = _ageLowAPIThrow; SearchEventManager.Instance._heightTo = _heightToAPIThrow; SearchEventManager.Instance._heightFrom = _heightFromAPIThrow; SearchEventManager.Instance._bodyType = _bodyTypeAPIThrow; SearchEventManager.Instance._isImage = _isImageAPIThrow; SearchEventManager.Instance._radius = _radiusAPIThrow; SearchEventManager.Instance._keyword = _keyword.text; SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; Debug.Log(condition._isImage + " 画像の有無で検索。 "); Debug.Log(condition._radius + " 距離で検索 "); Debug.Log(condition._keyword + " キ=ワードで検索 "); LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); }
IEnumerator InitFromCondition() { _loadingOverlay.SetActive(true); 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); } SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY); //条件検索のデータがローカルファイルに残っている場合。 if (SearchCondition != null) { SearchEventManager.Instance._lat = SearchCondition._lat; SearchEventManager.Instance._lng = SearchCondition._lng; SearchEventManager.Instance._order = SearchCondition._order; SearchEventManager.Instance._sex = SearchCondition._sex; SearchEventManager.Instance._ageFrom = SearchCondition._ageFrom; SearchEventManager.Instance._ageTo = SearchCondition._ageTo; SearchEventManager.Instance._heightFrom = SearchCondition._heightFrom; SearchEventManager.Instance._heightTo = SearchCondition._heightTo; SearchEventManager.Instance._bodyType = SearchCondition._bodyType; SearchEventManager.Instance._isImage = SearchCondition._isImage; SearchEventManager.Instance._radius = SearchCondition._radius; SearchEventManager.Instance._keyword = SearchCondition._keyword; } // 通信レスポンス待ってから UserListApi._success = false; new UserListApi( // todo とりあえず試すため全部の設定 あとできちんと値を設定して絞り込むようにしてください AppStartLoadBalanceManager._userKey, EventManager.SearchEventManager.Instance._lat, EventManager.SearchEventManager.Instance._lng, EventManager.SearchEventManager.Instance._order, EventManager.SearchEventManager.Instance._sex, EventManager.SearchEventManager.Instance._ageFrom, EventManager.SearchEventManager.Instance._ageTo, EventManager.SearchEventManager.Instance._heightFrom, EventManager.SearchEventManager.Instance._heightTo, EventManager.SearchEventManager.Instance._bodyType, EventManager.SearchEventManager.Instance._isImage, EventManager.SearchEventManager.Instance._radius, EventManager.SearchEventManager.Instance._keyword, "1" ); while (UserListApi._success == false) { yield return(UserListApi._success == true); } SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (UserListApi._httpCatchData.result.users != null) { if (UserListApi._httpCatchData.result.users.Count > 0) { _InfiniteLimitScroll.GetComponent <SearchListSmallImageInfiniteLimitScroll> ().m_currentItemNo = 0; _InfiniteLimitScroll.GetComponent <SearchListSmallImageInfiniteLimitScroll> ().Init(); EventManager.SearchEventManager.Instance._nowShowPage = "1"; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.9995f; if (UserListApi._httpCatchData.result.users.Count >= 20) { _nextButton.SetActive(true); } } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, PanelListZeroFinishClose ); PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG)); } } else { _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); } _loadingOverlay.SetActive(false); }
IEnumerator InitFromCondition() { _loadingOverlay.SetActive(true); string lat = ""; string lng = ""; #if !UNITY_EDITOR if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lat) == false) { lat = GetUserApi._httpCatchData.result.user.lat; } if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lng) == false) { lng = GetUserApi._httpCatchData.result.user.lng; } #endif // 通信レスポンス待ってから new BoardListApi ( AppStartLoadBalanceManager._userKey, EventManager.BulletinBoardEventManager.Instance._CategoryID, lat, lng, EventManager.BulletinBoardEventManager.Instance._sex, EventManager.BulletinBoardEventManager.Instance._ageFrom, EventManager.BulletinBoardEventManager.Instance._ageTo, EventManager.BulletinBoardEventManager.Instance._heightFrom, EventManager.BulletinBoardEventManager.Instance._heightTo, EventManager.BulletinBoardEventManager.Instance._bodyType, EventManager.BulletinBoardEventManager.Instance._isImage, EventManager.BulletinBoardEventManager.Instance._radius, EventManager.BulletinBoardEventManager.Instance._keyword, "1" ); while (BoardListApi._success == false) { yield return(BoardListApi._success == true); } string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME; LocalFileHandler.Init(_commonFileName); BulletinBoardEventManager.SearchCondition condition = new BulletinBoardEventManager.SearchCondition(); condition._lat = BulletinBoardEventManager.Instance._lat; condition._lng = BulletinBoardEventManager.Instance._lng; condition._CategoryID = BulletinBoardEventManager.Instance._CategoryID; condition._sex = BulletinBoardEventManager.Instance._sex; condition._ageFrom = BulletinBoardEventManager.Instance._ageFrom; condition._ageTo = BulletinBoardEventManager.Instance._ageTo; condition._heightFrom = BulletinBoardEventManager.Instance._heightFrom; condition._heightTo = BulletinBoardEventManager.Instance._heightTo; condition._bodyType = BulletinBoardEventManager.Instance._bodyType; condition._isImage = BulletinBoardEventManager.Instance._isImage; condition._radius = BulletinBoardEventManager.Instance._radius; condition._keyword = BulletinBoardEventManager.Instance._keyword; LocalFileHandler.Save <BulletinBoardEventManager.SearchCondition>(LocalFileConstants.BBS_SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (BoardListApi._httpCatchData.result.boards != null) { if (BoardListApi._httpCatchData.result.boards.Count > 0) { // 条件検索の場合は無条件に初期化 _boardListInfiniteLimitScroll.GetComponent <BoardListInfiniteLimitScroll> ().m_currentItemNo = 0; _boardListInfiniteLimitScroll.GetComponent <BoardListInfiniteLimitScroll> ().Init(); _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; EventManager.BulletinBoardEventManager.Instance._nowShowPage = "1"; } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, BoardPanelListZeroFinishClose ); PanelPopupAnimate(GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG)); } } else { _boardListInfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); PopupPanel.Instance.PopMessageInsert( LocalMsgConst.LIST_SEARCH_ZERO, LocalMsgConst.OK, BoardPanelListZeroFinishClose ); } _loadingOverlay.SetActive(false); }
IEnumerator Init(int pageChange) { 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); } _loadingOverlay.SetActive(true); SearchEventManager.SearchCondition SearchCondition = LocalFileHandler.Load <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY); //条件検索のデータがローカルファイルに残っている場合。 if (SearchCondition != null) { SearchEventManager.Instance._lat = SearchCondition._lat; SearchEventManager.Instance._lng = SearchCondition._lng; SearchEventManager.Instance._order = SearchCondition._order; SearchEventManager.Instance._sex = SearchCondition._sex; SearchEventManager.Instance._ageFrom = SearchCondition._ageFrom; SearchEventManager.Instance._ageTo = SearchCondition._ageTo; SearchEventManager.Instance._heightFrom = SearchCondition._heightFrom; SearchEventManager.Instance._heightTo = SearchCondition._heightTo; SearchEventManager.Instance._bodyType = SearchCondition._bodyType; SearchEventManager.Instance._isImage = SearchCondition._isImage; SearchEventManager.Instance._radius = SearchCondition._radius; SearchEventManager.Instance._keyword = SearchCondition._keyword; } // 通信レスポンス待ってから UserListApi._success = false; int page_next = int.Parse(EventManager.SearchEventManager.Instance._nowShowPage) + pageChange; new UserListApi( AppStartLoadBalanceManager._userKey, SearchEventManager.Instance._lat, SearchEventManager.Instance._lng, SearchEventManager.Instance._order, SearchEventManager.Instance._sex, SearchEventManager.Instance._ageFrom, SearchEventManager.Instance._ageTo, SearchEventManager.Instance._heightFrom, SearchEventManager.Instance._heightTo, SearchEventManager.Instance._bodyType, SearchEventManager.Instance._isImage, SearchEventManager.Instance._radius, SearchEventManager.Instance._keyword, page_next.ToString() //EventManager.SearchEventManager.Instance._nowShowPage ); while (UserListApi._success == false) { yield return(UserListApi._success == true); } SearchEventManager.SearchCondition condition = new SearchEventManager.SearchCondition(); condition._lat = SearchEventManager.Instance._lat; condition._lng = SearchEventManager.Instance._lng; condition._order = SearchEventManager.Instance._order; condition._sex = SearchEventManager.Instance._sex; condition._ageFrom = SearchEventManager.Instance._ageFrom; condition._ageTo = SearchEventManager.Instance._ageTo; condition._heightFrom = SearchEventManager.Instance._heightFrom; condition._heightTo = SearchEventManager.Instance._heightTo; condition._bodyType = SearchEventManager.Instance._bodyType; condition._isImage = SearchEventManager.Instance._isImage; condition._radius = SearchEventManager.Instance._radius; condition._keyword = SearchEventManager.Instance._keyword; LocalFileHandler.Save <SearchEventManager.SearchCondition>(LocalFileConstants.SEARCH_CONDITION_KEY, condition); LocalFileHandler.Flush(); if (UserListApi._httpCatchData.result.users != null) { if (UserListApi._httpCatchData.result.users.Count > 0) { _InfiniteLimitScroll.GetComponent <SearchListLargeImageInfiniteLimitScroll> ().Init(); // 更新後のリストの位置にバーをあわせる if (pageChange >= 0) { _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; } else { _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.005f; } int page = int.Parse(SearchEventManager.Instance._nowShowPage) + pageChange; if (page % 4 == 0) { System.GC.Collect(); Resources.UnloadUnusedAssets(); } SearchEventManager.Instance._nowShowPage = page.ToString(); } else { // リストのないページカウントになってるので 一旦通信とリストの更新をさせないようにする _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelMax(0); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelInstantateCount(0); } } else { _disablePageForNetworkCall = true; _InfiniteLimitScrollBar.GetComponent <Scrollbar> ().value = 0.995f; Debug.Log("存在しないページにアクセスしようとしたのでやめる"); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelMax(0); //_InfiniteLimitScroll.GetComponent<SearchListLargeImageInfiniteLimitScroll> ().SetPanelInstantateCount(0); } _loadingOverlay.SetActive(false); }
/// <summary> /// Start this instance. /// </summary> IEnumerator Start() { #if UNITY_IPHONE && !UNITY_EDITOR NotificationServices.RegisterForNotifications( NotificationType.Alert | NotificationType.Badge | NotificationType.Sound); // notification clear NativeRecieveManager.RemotePushClear(); #endif //ローディングアニメーション取得。 _loadAnimation.SetActive(true); //アプリ全体で使用する変数をリセット。 ResetStaticVariable(); //仮登録API ---------------------- new PreRegistUser(); while (PreRegistUser._success == false) { yield return(PreRegistUser._success == true); } _userKey = PreRegistUser._httpCatchData.result.user.user_key; _gender = PreRegistUser._httpCatchData.result.user.sex_cd; new GetUserApi(); while (GetUserApi._success == false) { yield return(GetUserApi._success == true); } //-------------------------------- 広告用設定 初期化処理 ここから -------------------------------- #if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR if (GetUserApi._httpCatchData.result.review == "false") { string nendNativeAdApiKey_IOS = ""; string nendNativeAdSpotId_IOS = ""; string nendNativeAdApiKey_Android = ""; string nendNativeAdSpotId_Android = ""; if (CommonConstants.IS_AD_TEST == true) { //Imobile Test mode IMobileSdkAdsUnityPlugin.setTestMode(true); //Maio test mode Maio.SetAdTestMode(true); //バナー広告用 テスト IMobileSdkAdsUnityPlugin.registerInline( CommonConstants.IMOBILE_PARTNER_TEST_ID, CommonConstants.IMOBILE_MDDIA_TEST_ID, CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID ); IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_TEST_ID, CommonConstants.IMOBILE_MDDIA_TEST_ID, CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID ); //スポット情報の取得処理 //バナー広告用テスト IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_TEST_ID); //インタースティシャル広告テスト IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_TEST_ID); //NEND IOS用 テスト nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_TEST_ID; nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID; //NEND Android用 テスト nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_TEST_ID; nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_TEST_ID; } else { // //バナー広告用 IMobileSdkAdsUnityPlugin.registerInline( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_BANNER_SPOT_ID ); //インタースティシャル用 IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID ); //フル広告用 IMobileSdkAdsUnityPlugin.registerFullScreen( CommonConstants.IMOBILE_PARTNER_ID, CommonConstants.IMOBILE_MDDIA_ID, CommonConstants.IMOBILE_FULL_SPOT_ID ); //スポット情報の取得処理 //インタースティシャル IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_INTERSTATIAL_SPOT_ID); //バナー IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_BANNER_SPOT_ID); //アイモバイル・フル広告用 IMobileSdkAdsUnityPlugin.start(CommonConstants.IMOBILE_FULL_SPOT_ID); //NEND Native AD IOS nendNativeAdApiKey_IOS = CommonConstants.NEND_NATIVEAD_API_IOS_ID; nendNativeAdSpotId_IOS = CommonConstants.NEND_NATIVEAD_SPOT_IOS_ID; //NEND Native AD ANDROID nendNativeAdApiKey_Android = CommonConstants.NEND_NATIVEAD_API_ANDROID_ID; nendNativeAdSpotId_Android = CommonConstants.NEND_NATIVEAD_SPOT_ANDROID_ID; } //Nend Native Ad セットアップ処理。 #if UNITY_EDITOR // UnityEditorの場合は、広告枠のタイプを指定しテスト用の広告を使って表示の確認が行えます。 m_NendAdClient = NativeAdClientFactory.NewClient(NativeAdClientFactory.NativeAdType.SmallSquare); m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID); #elif UNITY_IPHONE m_NendAdClient = NativeAdClientFactory.NewClient(nendNativeAdSpotId_IOS, nendNativeAdApiKey_IOS); m_NendAdFullBoard = NendAdFullBoard.NewFullBoardAd(CommonConstants.NEND_NATIVEFULL_SPOT_IOS_ID, CommonConstants.NEND_NATIVEFULL_API_IOS_ID); #elif UNITY_ANDROID m_NendAdClient = NativeAdClientFactory.NewClient(nendNativeAdSpotId_Android, nendNativeAdApiKey_Android); //m_NendAdFullBoard = NativeAdClientFactory.NewClient (nendNativeAdSpotId_Android, nendNativeAdApiKey_Android); #endif //バナー広告用。 IMobileSdkAdsUnityPlugin.inlinieAdOrientation = IMobileSdkAdsUnityPlugin.ImobileSdkAdsInlineAdOrientation.PORTRAIT; //maio動画広告のクローズボタンが押された時のイベント処理。 Maio.OnClosedAd += MaioMovieSdkEvent.OnClosed; //動画 広告用。 Maio.Start(CommonConstants.MAIO_MEDIA_ID); NendAdBannerOrigenalManager.Instance.Init(); } #endif //-------------------------------- 広告用設定 初期化処理 ここまで-------------------------------- //メンテナンスの場合、処理を止める。 if (AppliEventController.Instance.MaintenanceCheck() == true) { _loadAnimation.SetActive(false); yield break; } //ユーザーのステータスをチェックする処理。 AppliEventController.Instance.UserStatusProblem(); //強制アップデートの場合、処理を止める。 if (AppliEventController.Instance.ForceUpdateCheck() == true) { _loadAnimation.SetActive(false); yield break; } //GPSを取得する処理。 yield return(StartCoroutine(GpsSet())); #if UNITY_IPHONE && !UNITY_EDITOR NativeRecieveManager.GetPushMessageIos(); #endif _tokenSent = false; _toPushCatchUserId = ""; #if UNITY_ANDROID //ステータスバーを表示 //Android用 ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent; #endif //基本プロフィールを作成しているかどうかの判定。 if (string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.name) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.pref) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.city_id) == false && string.IsNullOrEmpty(PreRegistUser._httpCatchData.result.user.birth_date) == false) { //基本プロフィールを作成している。 _isBaseProfile = true; } else { //まだ、基本プロフィールを作成していない。 _isBaseProfile = false; } //サーバーにイベント通知用Api(インストール時に一回のみ) ---------------------- _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); } //ここでユーザーキーを保存 LocalFileHandler.SetString(LocalFileConstants.USER_KEY, _userKey); LocalFileHandler.Flush(); //レビュー時、すれ違い機能は表示しないようにしておく。リスクヘッジ。 #if UNITY_ANDROID && !UNITY_EDITOR _deviceToken = GCMService.GetRegistrationId(); //デバイストークンの登録API---------------------- if (string.IsNullOrEmpty(_deviceToken) == false) { new SetDeviceToken(_userKey, _deviceToken); while (SetDeviceToken._success == false) { yield return(SetDeviceToken._success == true); } } else { GCMService.Registration(); } #endif //初期マスターデータの取得 //ファイルネーム比較してマスター更新分があったら再度Api飛ばしてローカルデータを更新する new InitDataApi(); while (InitDataApi._success == false) { yield return(InitDataApi._success == true); } //新着メッセージ未既読のAPI取得する new GetUnreadMessageCountApi(); while (GetUnreadMessageCountApi._success == false) { yield return(GetUnreadMessageCountApi._success == true); } _msgBadge = GetUnreadMessageCountApi._httpCatchData.result.count; var user = PreRegistUser._httpCatchData.result.user; if (string.IsNullOrEmpty(user.pref) == false && string.IsNullOrEmpty(user.city_id) == false && user.pref != "0" && user.city_id != "0") { if (PreRegistUser._httpCatchData.result.complete.Count > 0) { //Mypageシーンに遷移 - 遷移する前にログインボーナス表示 string loginComplete = PreRegistUser._httpCatchData.result.complete [0]; if (string.IsNullOrEmpty(loginComplete) == false) { StartEventManager.Instance.PanelPopupAnimate(_loginBonus); _loginBonus.transform.GetChild(0).localScale = new Vector3(1, 1, 1); _loadAnimation.SetActive(false); yield break; } else { _loadAnimation.SetActive(false); NextSceneProccess(); yield break; } } else { _loadAnimation.SetActive(false); NextSceneProccess(); yield break; } } else { if (_gender != "0") { NextSceneProccess(); yield break; } #if !UNITY_EDITOR && UNITY_IPHONE //初回時に通る処理。 => ポップアップ //説明用ポップアップ。 PopupSecondSelectPanel.Instance.PopMessageInsert( LocalMsgConst.SELF_SHARE_INFO_CONFIRM, LocalMsgConst.APPROVAL, LocalMsgConst.DENIAL, PublicUserInfoAllow, PublicUserInfoDeny ); GameObject obj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_SECOND_SELECT_TAG); StartEventManager.Instance.PanelPopupAnimate(obj); #endif if (string.IsNullOrEmpty(LocalFileHandler.GetString(LocalFileConstants.VALID_URL_KEY)) == true) { if (GetUserApi._httpCatchData.result.review == "false") { new Valid(_userKey); while (Valid._success == false) { yield return(Valid._success == true); } //start app installed. defaul browser open if (string.IsNullOrEmpty(Valid._httpCatchData.result.url) == false) { //ローカルファイルにvalid_urlで保存 初回インストール時のみ通知するURLとする LocalFileHandler.SetString(LocalFileConstants.VALID_URL_KEY, Valid._httpCatchData.result.url); LocalFileHandler.Flush(); var uri = new System.Uri(Valid._httpCatchData.result.url); Application.OpenURL(uri.AbsoluteUri); } } } LocalFileHandler.HashAllClear(); _startAnimation.GetComponent <uTweenPosition> ().enabled = true; _loadAnimation.SetActive(false); } }