コード例 #1
0
 private void CreateInterstitialsSection()
 {
     GUILayout.Space((float)this._sectionMarginSize);
     GUILayout.Label("Interstitials", new GUILayoutOption[0]);
     if (!MoPubDemoGUI.IsAdUnitArrayNullOrEmpty(this._interstitialAdUnits))
     {
         foreach (string text in this._interstitialAdUnits)
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUI.enabled = !this._adUnitToLoadedMapping[text];
             if (GUILayout.Button(MoPubDemoGUI.CreateRequestButtonLabel(text), new GUILayoutOption[0]))
             {
                 UnityEngine.Debug.Log("requesting interstitial with AdUnit: " + text);
                 this._status = "Requesting " + text;
                 MoPubAndroid.RequestInterstitialAd(text, string.Empty, string.Empty);
             }
             GUI.enabled = this._adUnitToLoadedMapping[text];
             if (GUILayout.Button("Show", new GUILayoutOption[0]))
             {
                 this._status = string.Empty;
                 MoPubAndroid.ShowInterstitialAd(text);
             }
             GUI.enabled = true;
             GUILayout.EndHorizontal();
         }
     }
     else
     {
         GUILayout.Label("No interstitial AdUnits available", this._smallerFont, null);
     }
 }
コード例 #2
0
 private void CreateInterstitialsSection()
 {
     GUILayout.Space((float)this._sectionMarginSize);
     GUILayout.Label("Interstitials", Array.Empty <GUILayoutOption>());
     if (!IsAdUnitArrayNullOrEmpty(this._interstitialAdUnits))
     {
         foreach (string str in this._interstitialAdUnits)
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUI.set_enabled(!this._adUnitToLoadedMapping[str]);
             if (GUILayout.Button(CreateRequestButtonLabel(str), Array.Empty <GUILayoutOption>()))
             {
                 Debug.Log("requesting interstitial with AdUnit: " + str);
                 this.UpdateStatusLabel("Requesting " + str);
                 MoPubAndroid.RequestInterstitialAd(str, string.Empty, string.Empty);
             }
             GUI.set_enabled(this._adUnitToLoadedMapping[str]);
             if (GUILayout.Button("Show", Array.Empty <GUILayoutOption>()))
             {
                 this.ClearStatusLabel();
                 MoPubAndroid.ShowInterstitialAd(str);
             }
             GUI.set_enabled(true);
             GUILayout.EndHorizontal();
         }
     }
     else
     {
         GUILayout.Label("No interstitial AdUnits available", this._smallerFont, null);
     }
 }
コード例 #3
0
 public override void doRequest()
 {
     base.LogFunc("doRequest()");
     AdsRequestHelper.DebugLog("MoPub.RequestInterstitialAd(" + base.adUnitId + ")");
     MoPubAndroid.RequestInterstitialAd(base.adUnitId, string.Empty, string.Empty);
     base.callback.onRequest(this, "Mopub");
 }
コード例 #4
0
 public void RequestInterstitial()
 {
     if (!this.fsEnabled)
     {
         return;
     }
     this.fsLoadReqTime = DateTime.Now;
     MoPubAndroid.RequestInterstitialAd(this.interstitialAdUnit, string.Empty, string.Empty);
     FMLogger.vAds("start fs request");
 }
コード例 #5
0
 public void RequestInterstitial()
 {
     if (PlayerPrefsManager.GetNoAd() != 1)
     {
         if (Application.internetReachability == NetworkReachability.NotReachable)
         {
             Invoke("RequestInterstitial", 1f);
         }
         else if (!interstitialAvailable)
         {
             MoPubAndroid.RequestInterstitialAd(_interstitialAdUnits[0], string.Empty, string.Empty);
         }
     }
 }