private void Advertising_RewardedAdCompleted(RewardedAdNetwork arg1, AdPlacement arg2) { text.text = "COMPLETED AD"; }
private void RewardedAdSkippedHandler(RewardedAdNetwork network, AdPlacement location) { Advertising.RewardedAdSkipped -= RewardedAdSkippedHandler; Advertising.RewardedAdCompleted -= RewardedAdCompletedHandler; ShowNotAvailableWindow(); }
// 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)); }
protected override void DestroyBanner() { Advertising.DestroyBannerAd( SelectedNetwork, AdPlacement.PlacementWithName(customKeyInputField.text)); }
protected override void LoadAd() { Advertising.LoadInterstitialAd(SelectedNetwork, AdPlacement.PlacementWithName(CustomKey)); }
private void Advertising_RewardedAdCompleted(RewardedAdNetwork arg1, AdPlacement arg2) { DoRespawn(); }
public bool IsAdReady(AdPlacement placement) { return(true); }
public AdResultData(AdPlacement placement, AdResult result, string provider) { this.placement = placement; this.result = result; this.provider = provider; }
void Advertising_RewardedAdCompleted(RewardedAdNetwork network, AdPlacement loc) { adNetwork.Value = network; Fsm.Event(eventTarget, adCompletedEvent); }
public bool IsAdReady(AdPlacement placement) { return(adsProviderService.IsAdReady(placement)); }
protected override void LoadAd() { Advertising.LoadRewardedAd(SelectedNetwork, AdPlacement.PlacementWithName(CustomKey)); }
private void InterstitialAdCompletedHandler(InterstitialAdNetwork network, AdPlacement location) { ResetCount(); Advertising.LoadInterstitialAd(); }
public bool HasPlacement(AdPlacement placement) { return(!this.adsDisabled && this.placements != null && this.placements.Contains(placement)); }
public static AdConfig FromResponse(AdsServerResponse response, bool isTablet) { AdConfig adConfig = new AdConfig(); if (!string.IsNullOrEmpty(response.adUnit_banner)) { adConfig.bannerAdUnit = response.adUnit_banner; } else { adConfig.bannerAdUnit = ((!isTablet) ? "f22e60410d82403aa5e0fb791ef9c153" : "1253b5589a4d45869288611de14229d6"); } if (!string.IsNullOrEmpty(response.adUnit_fullscreen)) { adConfig.fsAdUnit = response.adUnit_fullscreen; } else { adConfig.fsAdUnit = ((!isTablet) ? "72bb0678c400487b8d1a941944fa6888" : "8cae328870984a9987623f9c6e52b25d"); } if (!string.IsNullOrEmpty(response.adUnit_rewarded)) { adConfig.rewardAdUnit = response.adUnit_rewarded; } else { adConfig.rewardAdUnit = ((!isTablet) ? "6bc3898062484e71a114d0ab59cb1c78" : "0543e571406140dd96252ac1351b99f5"); } adConfig.adsDisabled = (response.ad_module_active == 0); adConfig.interval = response.interstitial_delay / 1000; adConfig.startInterval = response.interstitial_delay_onstart / 1000; adConfig.appLaunchDelay = (float)response.applaunch_delay / 1000f; adConfig.fsInternalOnReward = Mathf.Max(0, response.interstitial_delay_onreward / 1000); adConfig.bannerShowTime = Mathf.Max(10, response.banner_show_time / 1000); adConfig.bannerLoadDelay = Mathf.Max(1, response.banner_load_delay / 1000); adConfig.adsTest = (response.ad_module_test_mode == 1); adConfig.placements = new List <AdPlacement>(); adConfig.chances = new List <int>(); if (response.fullscreen_showing_config != null) { for (int i = 0; i < response.fullscreen_showing_config.Length; i++) { AdsFsPlacementConfig adsFsPlacementConfig = response.fullscreen_showing_config[i]; AdPlacement adPlacement = AdConfig.ParsePlacement(adsFsPlacementConfig.id); if (adPlacement != AdPlacement.Unknown) { adConfig.placements.Add(adPlacement); adConfig.chances.Add(Mathf.Clamp(adsFsPlacementConfig.chance, 0, 100)); } } } if (response.banner_showing_config != null && response.banner_showing_config.id != null) { adConfig.bannerPos = AdConfig.ParseBannerPosition(response.banner_showing_config.show); if (adConfig.bannerPos != BannerPosition.None) { adConfig.bannerPlaces = new List <BannerPlacement>(); for (int j = 0; j < response.banner_showing_config.id.Length; j++) { BannerPlacement bannerPlacement = AdConfig.ParseBannerPlacement(response.banner_showing_config.id[j]); if (bannerPlacement != BannerPlacement.Unknown) { adConfig.bannerPlaces.Add(bannerPlacement); } } } } else { adConfig.bannerPos = BannerPosition.None; } adConfig.rewardConfig = AdConfig.FromRespone(response.rewarded_config, false); return(adConfig); }
void RewardedAdCompletedHandler(RewardedAdNetwork network, AdPlacement location) => _gameManagerScript.GameContinue();
public bool HasInterstitialPlacement(AdPlacement placement) { return(this.IsEnabled() && !this.bannerDisabled && this.config != null && this.config.HasPlacement(placement)); }
private void Advertising_RewardedAdSkipped(RewardedAdNetwork arg1, AdPlacement arg2) { Time.timeScale = 1; InGame.playerAlive = false; Die(); }
private void RewardGems(RewardedAdNetwork rewardedAdNet, AdPlacement adPlacement) { PlayerDataModel.AddCoins(countToAdd); Advertising.RewardedAdCompleted -= RewardGems; }
public override void OnEnter() { mAdNetwork = (RewardedAdNetwork)adNetwork.Value; mPlacement = AdPlacement.PlacementWithName(adPlacement.Value); }
public UniRx.IObservable <AdWatched> TryToShow(AdPlacement placement) { return(TryToShow(placement, CurrentProvider.Value)); }
public bool TryShowAd(AdPlacement placement) { return(true); }
private void OnRewardedInterstitialSkipped(RewardedInterstitialAdNetwork network, AdPlacement placement) { StartCoroutine(DelayCoroutine(GetPopupDelayTime((AdNetwork)network), () => NativeUI.Alert("Rewarded Interstitial Ad Skipped", string.Format( "The rewarded interstitial ad was skipped, and the user shouldn't get the reward. Network: {0}, Placement: {1}", network, AdPlacement.GetPrintableName(placement))))); Debug.Log(string.Format( "The rewarded interstitial ad was skipped, and the user shouldn't get the reward. Network: {0}, Placement: {1}", network, AdPlacement.GetPrintableName(placement))); }
protected override bool IsAdReady() { return(Advertising.IsInterstitialAdReady(SelectedNetwork, AdPlacement.PlacementWithName(CustomKey))); }
private void OnRewardedInterstitialCompleted(RewardedInterstitialAdNetwork network, AdPlacement placement) { StartCoroutine(DelayCoroutine(GetPopupDelayTime((AdNetwork)network), () => NativeUI.Alert("Rewarded Interstitial Ad Completed", string.Format( "The rewarded interstitial ad has completed, this is when you should reward the user. Network: {0}, Placement: {1}", network, AdPlacement.GetPrintableName(placement))))); Debug.Log(string.Format( "The rewarded interstitial ad has completed, this is when you should reward the user. Network: {0}, Placement: {1}", network, AdPlacement.GetPrintableName(placement))); }
private void RewardedAdCompletedHandler(RewardedAdNetwork network, AdPlacement location) { Advertising.RewardedAdSkipped -= RewardedAdSkippedHandler; Advertising.RewardedAdCompleted -= RewardedAdCompletedHandler; storeReward.PurchaseCompleted(); }
private void Advertising_RewardedAdSkipped(RewardedAdNetwork arg1, AdPlacement arg2) { text.text = "SKIPPED AD"; }
public AdShowData(AdPlacement placement, string provider) { this.placement = placement; this.provider = provider; }
// 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(); }