Example #1
0
    // Event handler called when a rewarded ad has been skipped
    private void RewardedAdSkippedHandler(RewardedAdNetwork network, AdPlacement location)
    {
        Debug.Log("Rewarded ad was skipped. The user should NOT be rewarded.");

        StartCoroutine(EventManager.Instance.GameOverTrigger?.Invoke(GameOverType.WrongAnswer));
    }
 private void Advertising_RewardedAdCompleted(RewardedAdNetwork arg1, AdPlacement arg2)
 {
     DoRespawn();
 }
 public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdLocation location)
 {
     ShowRewardedAd(adNetwork, location.ToAdPlacement());
 }
Example #4
0
 private void RewaredOnSkip(RewardedAdNetwork network, AdLocation location)
 {
     Debug.Log("Rewarded ad was skipped. The user should NOT be rewarded.");
     DeleteAddEvent();
 }
Example #5
0
 public DefaultAdNetworks(BannerAdNetwork banner, InterstitialAdNetwork interstitial, RewardedAdNetwork rewarded)
 {
     bannerAdNetwork       = banner;
     interstitialAdNetwork = interstitial;
     rewardedAdNetwork     = rewarded;
 }
 /// <summary>
 /// Shows the rewarded ad of the specified ad network at the specified placement.
 /// </summary>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="placement">Placement. Pass <c>AdPlacement.Default</c> to specify the default placement.</param>
 public static void ShowRewardedAd(RewardedAdNetwork adNetwork, AdPlacement placement)
 {
     ShowRewardedAd(GetWorkableAdClient((AdNetwork)adNetwork), placement);
 }
Example #7
0
 void RewardedAdCompletedHandler(RewardedAdNetwork network, AdPlacement location) => _gameManagerScript.GameContinue();
Example #8
0
 private void RewardedAdSkippedHandler(RewardedAdNetwork network, AdPlacement location)
 {
     Advertising.RewardedAdSkipped   -= RewardedAdSkippedHandler;
     Advertising.RewardedAdCompleted -= RewardedAdCompletedHandler;
     ShowNotAvailableWindow();
 }
Example #9
0
 private void Advertising_RewardedAdSkipped(RewardedAdNetwork arg1, AdPlacement arg2)
 {
     text.text = "SKIPPED AD";
 }
Example #10
0
 private void Advertising_RewardedAdCompleted(RewardedAdNetwork arg1, AdPlacement arg2)
 {
     text.text = "COMPLETED AD";
 }
Example #11
0
 private void RewardGems(RewardedAdNetwork rewardedAdNet, AdPlacement adPlacement)
 {
     PlayerDataModel.AddCoins(countToAdd);
     Advertising.RewardedAdCompleted -= RewardGems;
 }
Example #12
0
 void Advertising_RewardedAdCompleted(RewardedAdNetwork network, AdPlacement loc)
 {
     adNetwork.Value = network;
     Fsm.Event(eventTarget, adCompletedEvent);
 }
Example #13
0
 void OnRewardedAdSkipped(RewardedAdNetwork arg1, AdLocation arg2)
 {
     NativeUI.Alert("Rewarded Ad Skipped", "The rewarded ad was skipped, and the user shouldn't get the reward.");
 }
 public override void OnEnter()
 {
     mAdNetwork = (RewardedAdNetwork)adNetwork.Value;
     mPlacement = AdPlacement.PlacementWithName(adPlacement.Value);
 }
Example #15
0
 void RewardedAdSkippedHandler(RewardedAdNetwork network, EasyMobile.AdPlacement location)
 {
     Debug.Log("Rewarded ad was skipped. The user should NOT be rewarded.");
 }
Example #16
0
 private void RewardedAdCompletedHandler(RewardedAdNetwork network, AdPlacement location)
 {
     Advertising.RewardedAdSkipped   -= RewardedAdSkippedHandler;
     Advertising.RewardedAdCompleted -= RewardedAdCompletedHandler;
     storeReward.PurchaseCompleted();
 }
Example #17
0
 // Event handler called when a rewarded ad has completed
 void RewardedAdCompletedHandler(RewardedAdNetwork network, AdLocation location)
 {
     Debug.Log("Rewarded ad has completed. The user should be rewarded now.");
     ResetFlag(); // For Challenge and Expert Mode
 }
Example #18
0
 void AdManager_RewardedAdCompleted(RewardedAdNetwork arg1, AdLocation arg2)
 {
     MobileNativeUI.Alert("Rewarded Ad Completed", "The rewarded ad has completed, this is when you should reward the user.");
 }
Example #19
0
 // Event handler called when a rewarded ad has been skipped
 void RewardedAdSkippedHandler(RewardedAdNetwork network, AdLocation location)
 {
     Debug.Log("Rewarded ad was skipped. The user should NOT be rewarded.");
 }
Example #20
0
 /// <summary>
 /// Determines whether the rewarded ad of the specified ad network
 /// at the specified placement is ready to show.
 /// </summary>
 /// <returns><c>true</c> if the ad is ready; otherwise, <c>false</c>.</returns>
 /// <param name="adNetwork">Ad network.</param>
 /// <param name="placement">Placement. Pass <c>AdPlacement.Default</c> to specify the default placement.</param>
 public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdPlacement placement)
 {
     return(IsRewardedAdReady(GetWorkableAdClient((AdNetwork)adNetwork), placement));
 }
Example #21
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 #22
0
 public static bool IsRewardedAdReady(RewardedAdNetwork adNetwork, AdLocation location)
 {
     return(IsRewardedAdReady(adNetwork, location.ToAdPlacement()));
 }
Example #23
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 #24
0
 private void RewaredOnComplete(RewardedAdNetwork network, AdLocation location)
 {
     Debug.Log("Rewarded ad has completed. The user should be rewarded now.");
     DeleteAddEvent();
 }
 private void Advertising_RewardedAdSkipped(RewardedAdNetwork arg1, AdPlacement arg2)
 {
     Time.timeScale     = 1;
     InGame.playerAlive = false;
     Die();
 }
Example #26
0
 private void OnRewardedAdSkipped(RewardedAdNetwork network, AdPlacement placement)
 {
 }
Example #27
0
    // Event handler called when a rewarded ad has completed
    private void RewardedAdCompletedHandler(RewardedAdNetwork network, AdPlacement location)
    {
        Debug.Log("Rewarded ad has completed. The user should be rewarded now.");

        EventManager.Instance.GetQuestion?.Invoke();
    }