private void ShowMopubAdOnLevelEnd() { #if UNITY_ANDROID Debug.Log("----------- Show MoPub Ad State: " + MoPubAndroidManager.INTERSTITIAL_AD_STATE); if (MoPubAndroidManager.INTERSTITIAL_AD_STATE == MoPubAndroidManager.INTERSTITIAL_STATES.LOADED) { MoPubAndroid.showInterstitalAd(); Debug.Log("----------- Show MoPub Ad State: " + "SHOWN"); } #endif #if UNITY_IPHONE if (MoPubManager.INTERSTITIAL_AD_STATE == MoPubManager.INTERSTITIAL_STATES.LOADED) { MoPubBinding.showInterstitialAd(Constants.INTERSTITIAL_ID_IOS); } #endif }
private void ShowMopubAdOnMainMenuScreen() { #if UNITY_ANDROID Debug.Log("----------- Show MoPub Ad State: " + MoPubAndroidManager.INTERSTITIAL_AD_STATE); if (MoPubAndroidManager.INTERSTITIAL_AD_STATE == MoPubAndroidManager.INTERSTITIAL_STATES.LOADED) { if (GameManager.Instance.GetCurrentGameState() == GameManager.GameState.MAINMENU) { MoPubAndroid.showInterstitalAd(); } } #endif #if UNITY_IPHONE if (MoPubManager.INTERSTITIAL_AD_STATE == MoPubManager.INTERSTITIAL_STATES.LOADED) { if (GameManager.Instance.GetCurrentGameState() == GameManager.GameState.MAINMENU) { MoPubBinding.showInterstitialAd(Constants.INTERSTITIAL_ID_IOS); } } #endif }