Example #1
0
 private static void OnInternalRewardedAdCompleted(RewardedAdNetwork network, AdLocation location)
 {
     if (RewardedAdCompleted != null)
     {
         RewardedAdCompleted(network, location);
     }
 }
Example #2
0
        private static void LoadInterstitialAd(IAdClient client, AdLocation location)
        {
            if (IsAdRemoved())
            {
                return;
            }

            client.LoadInterstitialAd(location);
        }
Example #3
0
        private static bool IsInterstitialAdReady(IAdClient client, AdLocation location)
        {
            if (IsAdRemoved())
            {
                return(false);
            }

            return(client.IsInterstitialAdReady(location));
        }
Example #4
0
        private static void ShowInterstitialAd(IAdClient client, AdLocation location)
        {
            if (IsAdRemoved())
            {
                Debug.Log("Could not show interstitial ad: ads were disabled by RemoveAds().");
                return;
            }

            client.ShowInterstitialAd(location);
        }
Example #5
0
 public static AdPlacement ToAdPlacement(this AdLocation location)
 {
     if (location == AdLocation.Default)
     {
         return(AdPlacement.Default);
     }
     else
     {
         return(AdPlacement.PlacementWithName(location.ToString()));
     }
 }
 public static void ShowInterstitialAd(InterstitialAdNetwork adNetwork, AdLocation location)
 {
     ShowInterstitialAd(adNetwork, location.ToAdPlacement());
 }
 public static bool IsInterstitialAdReady(InterstitialAdNetwork adNetwork, AdLocation location)
 {
     return(IsInterstitialAdReady(adNetwork, location.ToAdPlacement()));
 }
Example #8
0
 private static void OnInternalInterstitialAdCompleted(InterstitialAdNetwork network, AdLocation location)
 {
     if (InterstitialAdCompleted != null)
     {
         InterstitialAdCompleted(network, location);
     }
 }
Example #9
0
 private static void ShowRewardedAd(IAdClient client, AdLocation location)
 {
     // Note that we don't check if ads were removed because
     // rewarded ads should still be available after ads removal.
     client.ShowRewardedAd(location);
 }
Example #10
0
 private static bool IsRewardedAdReady(IAdClient client, AdLocation location)
 {
     return(client.IsRewardedAdReady(location));
 }
Example #11
0
 /// <summary>
 /// Determines whether an interstitial ad of the specified ad network, at the specified location, is ready to show.
 ///     - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>.
 ///     - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>.
 ///     - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>.
 /// If the specified network doesn't support interstitial ads, this method always returns false.
 /// </summary>
 /// <returns><c>true</c> if interstitial ad is ready for the specified location; otherwise, <c>false</c>.</returns>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="location">Location.</param>
 public static bool IsInterstitialAdReady(InterstitialAdNetwork adNetwork, AdLocation location)
 {
     return(IsInterstitialAdReady(SelectAdClient((AdNetwork)adNetwork), location));
 }
Example #12
0
 /// <summary>
 /// Shows a rewarded ad of the specified ad network, at the specified location.
 ///     - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>.
 ///     - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>.
 ///     - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>.
 /// If the specified network doesn't support rewarded ads, this method is a no-op.
 /// </summary>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="location">Location.</param>
 public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdLocation location)
 {
     ShowRewardedAd(SelectAdClient((AdNetwork)adNetwork), location);
 }
Example #13
0
 /// <summary>
 /// Determines whether a rewarded ad of the specified ad network, at the specified location, is ready to show.
 ///     - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>.
 ///     - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>.
 ///     - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>.
 /// If the specified network doesn't support rewarded ads, this method always returns false.
 /// </summary>
 /// <returns><c>true</c> if rewarded ad is ready; otherwise, <c>false</c>.</returns>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="location">Location.</param>
 public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdLocation location)
 {
     return(IsRewardedAdReady(SelectAdClient((AdNetwork)adNetwork), location));
 }
Example #14
0
 /// <summary>
 /// Shows an interstitial ad of the specified ad network, at the specified location.
 ///     - For AdColony, AdMob and Heyzap, the location will be ignored. You can pass <see cref="AdLocation.Default"/>.
 ///     - For Chartboost, select one of available locations or create a new location using <see cref="AdLocation.LocationFromName(name)"/>.
 ///     - For Unity Ads, use <see cref="AdLocation.Default"/> or create a new location for the desired zoneId using <see cref="AdLocation.LocationFromName(zoneId)"/>.
 /// If the specified network doesn't support interstitial ads, this method is a no-op.
 /// </summary>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="location">Location.</param>
 public static void ShowInterstitialAd(InterstitialAdNetwork adNetwork, AdLocation location)
 {
     ShowInterstitialAd(SelectAdClient((AdNetwork)adNetwork), location);
 }
Example #15
0
 public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdLocation location)
 {
     return(IsRewardedAdReady(adNetwork, location.ToAdPlacement()));
 }
Example #16
0
 public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdLocation location)
 {
     ShowRewardedAd(adNetwork, location.ToAdPlacement());
 }
Example #17
0
 private static void LoadRewardedAd(IAdClient client, AdLocation location)
 {
     client.LoadRewardedAd(location);
 }