예제 #1
0
	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)
		{
		}
	}
예제 #2
0
 public void Show()
 {
     if (_ad.IsLoaded())
     {
         _ad.Show();
     }
 }
예제 #3
0
 public void showInterstitialAd()
 {
     if (interstitial != null && interstitial.IsLoaded())
     {
         interstitial.Show();
     }
 }
예제 #4
0
 public void LoadAdmobInterstial()
 {
     interstialAd = new InterstitialAd (INTERSTIAL_ID);
     AdRequest request = new AdRequest.Builder ().Build ();
     if (!interstialAd.IsLoaded ()) {
         interstialAd.LoadAd (request);
     }
 }
예제 #5
0
        public override bool IsReady()
        {
#if UNITY_EDITOR
            return(false);
#else
            return(interstitial.IsLoaded());
#endif
        }
예제 #6
0
 public void showInterstitialAd()
 {
     hasShownAdOneTime = true;
     if (interstitial != null && interstitial.IsLoaded())
     {
         interstitial.Show();
     }
 }
예제 #7
0
 public static void ShowAndDestroyInterstitialAd(InterstitialAd interstitial)
 {
     try
     {
         if (interstitial.IsLoaded())
         {
             interstitial.Show();
         }
     }
     catch (Exception e) { }
 }
예제 #8
0
 public override void loadAd()
 {
     Debug.Log("Loading AdMob");
     if (interstitialAd.IsLoaded())
     {
         interstitialAd.Show();
         currentAdIndex = (currentAdIndex + 1) % activeNetworks;
     }
     else
     {
         requestInterstitial();
         loadNextNetwork();
     }
 }
예제 #9
0
 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);
     }
 }
예제 #10
0
    public void ShowInterstitial()
    {
        if (!UserProfile.Instance.HasAds() || !video)
        {
            return;
        }

        //if (isFacebookLoaded)
        //{
        //	ShowInterstitialFacebook();
        //}
        //else
        if (interstitial.IsLoaded())
        {
            ShowInterstitialAdmob();
        }
        //else if (Chartboost.hasInterstitial(CBLocation.Default))
        //{
        //	Chartboost.showInterstitial(CBLocation.Default);
        //}
    }