IEnumerator HandleAdClosedCoro() { yield return(null); SushiDebug.Log("HandleAdClosedCoro event received"); PlatformAds.HandleRewarded_Video(null, null, PlatformAds.AdsType.AdMob); BalloonSound.instance.ResumeToNormalTimeAndResumeAudioMixer(); }
public static void TryShowRewardedAd(ShopProductEntry shopProductEntry, ShopProductData shopProductData) { #if UNITY_ANDROID || UNITY_IOS TryShowAd("rewardedVideo", shopProductEntry, shopProductData, new ShowOptions { resultCallback = HandleShowResult_RewardedVideo }); #else PlatformAds.HandleRewarded_RewardedVideo(shopProductEntry, shopProductData, PlatformAds.AdsType.UnityAds); #endif }
public static void TryShowInterstitialAd(ShopProductEntry shopProductEntry, ShopProductData shopProductData, int stageNumber) { PlatformAds.stageNumber = stageNumber; #if UNITY_ANDROID || UNITY_IOS TryShowAd("video", shopProductEntry, shopProductData, new ShowOptions { resultCallback = HandleShowResult_Video }); #else PlatformAds.HandleRewarded_Video(shopProductEntry, shopProductData, PlatformAds.AdsType.UnityAds); #endif }
public static void TryShowInterstitialAd(ShopProductEntry shopProductEntry, ShopProductData shopProductData, int stageNumber) { PlatformAds.stageNumber = stageNumber; #if GOOGLE_MOBILE_ADS if (PlatformAdMobAdsInit.interstitial.IsLoaded()) { PlatformAdMobAdsInit.interstitial.Show(); } else { PlatformAds.HandleRewarded_Video(null, null, PlatformAds.AdsType.AdMob); } #endif }
public static void HandleShowResult_Video(ShowResult result) { switch (result) { case ShowResult.Finished: case ShowResult.Skipped: PlatformAds.HandleRewarded_Video(shopProductEntry, shopProductData, PlatformAds.AdsType.UnityAds); break; case ShowResult.Failed: Debug.LogError("The ad failed to be shown."); ShowAdsErrorPopup(); break; } }
public static void HandleShowResult_RewardedVideo(ShowResult result) { switch (result) { case ShowResult.Finished: PlatformAds.HandleRewarded_RewardedVideo(shopProductEntry, shopProductData, PlatformAds.AdsType.UnityAds); break; case ShowResult.Skipped: SushiDebug.Log("The ad was skipped before reaching the end. (Rewarded Video)"); ConfirmPopup.instance.Open(string.Format("\\광고 시청 도중 중단됐습니다. (Rewarded Video)".Localized())); break; case ShowResult.Failed: Debug.LogError("The ad failed to be shown."); ShowAdsErrorPopup(); break; } BalloonSound.instance.ResumeToNormalTimeAndResumeAudioMixer(); }
public static void HandleRewarded() { #if GOOGLE_MOBILE_ADS PlatformAds.HandleRewarded_RewardedVideo(shopProductEntry, shopProductData, PlatformAds.AdsType.AdMob); #endif }