public void showInterstitialAd() { try { currentAdDisplayTime = Time.time; float num = currentAdDisplayTime - Global.lastAdDisplayTime; if (interstitial != null && interstitial.IsLoaded()) { interstitial.Show(); Global.lastAdDisplayTime = currentAdDisplayTime; } else if (isLoaded) { interstitialAd.Show(); Global.lastAdDisplayTime = currentAdDisplayTime; } else if (num > Global.backFillAdGap && Monetization.IsReady(video_ad)) { ShowAdPlacementContent showAdPlacementContent = null; (Monetization.GetPlacementContent(video_ad) as ShowAdPlacementContent)?.Show(HandleShowResult); } else if (num > Global.backFillAdGap && IronSource.Agent.isInterstitialReady()) { ShowIronAd(); Global.lastAdDisplayTime = currentAdDisplayTime; } else if (num > Global.backFillAdGap && interstitial2 != null && interstitial2.IsLoaded()) { interstitial2.Show(); Global.lastAdDisplayTime = currentAdDisplayTime; } else if (Monetization.IsReady(rewarded_Video) || rewardLoaded) { Global.isRewardVidAvail = true; gm.retry.SetActive(value: true); gm.menu.SetActive(value: true); if (gm.gameFailed.activeSelf) { gm.failMenu.SetActive(value: true); gm.failRetry.SetActive(value: true); } } else { gm.retry.SetActive(value: true); gm.menu.SetActive(value: true); if (gm.gameFailed.activeSelf) { gm.failMenu.SetActive(value: true); gm.failRetry.SetActive(value: true); } } } catch (Exception) { } }
public void Show() { if (_ad.IsLoaded()) { _ad.Show(); } }
public void showInterstitialAd() { if (interstitial != null && interstitial.IsLoaded()) { interstitial.Show(); } }
public void showInterstitialAd() { hasShownAdOneTime = true; if (interstitial != null && interstitial.IsLoaded()) { interstitial.Show(); } }
void ShowInterstitial() { // Initialize an InterstitialAd. InterstitialAd interstitial = new InterstitialAd("ca-app-pub-9688313728956513/9454822785"); // Create an empty ad request. AdRequest intrequest = new AdRequest.Builder().Build(); // Load the interstitial with the request. interstitial.LoadAd(intrequest); interstitial.Show (); }
public static void ShowAndDestroyInterstitialAd(InterstitialAd interstitial) { try { if (interstitial.IsLoaded()) { interstitial.Show(); } } catch (Exception e) { } }
public override IEnumerator Show(System.Action onSuccess) { #if UNITY_EDITOR yield break; #else complete = false; interstitial.Show(); while (false == complete) { yield return(new WaitForSeconds(0.1f)); } #endif }
public override void loadAd() { Debug.Log("Loading AdMob"); if (interstitialAd.IsLoaded()) { interstitialAd.Show(); currentAdIndex = (currentAdIndex + 1) % activeNetworks; } else { requestInterstitial(); loadNextNetwork(); } }
public void showInterstitialAd() { if (isLoaded) { interstitialAd.Show(); UnityEngine.Debug.Log("SHOW AD XXX"); } else if (interstitial != null && interstitial.IsLoaded()) { interstitial.Show(); } else { MainMenuController.UIComponents2.SetActive(value: false); MainMenuController.ExitPanel2.SetActive(value: true); } }