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 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); } }