Пример #1
0
 private void RequestForMopubAd()
 {
     localCount++;
     if (localCount == displayAdAfterLvl && !UserPrefs.isIgnoreAds)
     {
         Debug.Log("----------- Show MoPub Ad State: " + " Request sent");
                     #if UNITY_ANDROID
         if (MoPubAndroidManager.INTERSTITIAL_AD_STATE != MoPubAndroidManager.INTERSTITIAL_STATES.LOADED &&
             MoPubAndroidManager.INTERSTITIAL_AD_STATE != MoPubAndroidManager.INTERSTITIAL_STATES.LOADING)
         {
             MoPubAndroid.requestInterstitalAd(Constants.INTERSTITIAL_ID_ANDROID);
             MoPubAndroidManager.INTERSTITIAL_AD_STATE = MoPubAndroidManager.INTERSTITIAL_STATES.LOADING;
         }
                     #endif
                     #if UNITY_IPHONE
         MoPubBinding.requestInterstitialAd(Constants.INTERSTITIAL_ID_IOS, null);
                     #endif
         localCount = 0;
     }
 }