/// <summary> /// Called on Awake after the singleton has been setup. /// </summary> protected override void GameSetup() { #if GOOGLE_ADS if (!GameManager.Instance.IsUnlocked && !string.IsNullOrEmpty(AdmobUnitIdAndroid) && !string.IsNullOrEmpty(AdmobUnitIdIos)) { Adverts = new AdMob(AdmobUnitIdAndroid, AdmobUnitIdIos); Adverts.HideBanner(); Adverts.RequestBanner(); } #endif }
public void HideBanner() { switch (bannerAdNetworkToUse) { #if ALLINONE_ADMOB case BannerAdNetworks.admob: adMob.HideBanner(); break; #endif default: Debug.Log("None"); break; } }
protected void Initialize() { CreateButtons(); CreateTutorialButtons(); trophyScreen.gameObject.SetActive(false); //トロフィー画面を一旦非表示にする reviewScreen.gameObject.SetActive(false); //レビュー要請画面を非表示にする finalMessageImage.gameObject.SetActive(false); //エンディング画面を非表示にする /*最後に開いていた画面に応じてUIを表示する*/ if (lastScreen == Screen.tutorial) { difficultyText.gameObject.SetActive(false); proceedButton.gameObject.SetActive(false); titleScreen.gameObject.SetActive(false); courseText.gameObject.SetActive(false); courseSelectionScreen.gameObject.SetActive(false); tutorialScreen.gameObject.SetActive(true); settingScreen.gameObject.SetActive(false); admob.ShowBanner(); } else if (lastScreen == Screen.courseSelection) { difficultyText.gameObject.SetActive(false); proceedButton.gameObject.SetActive(false); courseText.gameObject.SetActive(false); titleScreen.gameObject.SetActive(false); courseSelectionScreen.gameObject.SetActive(true); tutorialScreen.gameObject.SetActive(false); settingScreen.gameObject.SetActive(false); admob.ShowBanner(); /*クリア済みのコース数を取得する*/ int tmp = 0; for (int i = 0; i < theNumberOfCourses; i++) { /*クリア済みのコースにはチェックマークを表示する*/ if (PlayerPrefs.GetInt("Course" + (i + 1).ToString(), 0) == 1) { courseButtons[i].gameObject.transform.GetChild(1).transform.gameObject.SetActive(true); tmp++; } } clearedCourses = tmp; DisplayTrophyScreen(); //トロフィー画面を表示する if (clearedCourses == 16 || clearedCourses == 31) { RequestReview(); //ユーザーにアプリストアでのレビューを頼む } } else if (lastScreen == Screen.title) { difficultyText.gameObject.SetActive(false); proceedButton.gameObject.SetActive(false); courseText.gameObject.SetActive(false); titleScreen.gameObject.SetActive(true); courseSelectionScreen.gameObject.SetActive(false); tutorialScreen.gameObject.SetActive(false); settingScreen.gameObject.SetActive(false); admob.HideBanner(); } }