void InterstitialAdLoadedEvent(AdmodAdStatusHandler adHandler, object sender, string message, bool success) { if (AdsManager.Debugging && mCurrentDownload != adHandler) { Debug.LogWarning("InterstitialAds - Return download handler is not same as current download"); } if (mCurrentDownload == adHandler) { AdDownloadCallback(AdsType.Interstitial, success, message); } else { adHandler.OnAdAvailabilityUpdate(success); } //TODO //if ((object)InternalEventOnInterstitialAdsChanged != null) //{ // InternalEventOnInterstitialAdsChanged(); //} if (AdsManager.Debugging) { Debug.Log(success ? "InterstitialAds - Request Success" : ("InterstitialAds - Request Fail - " + message)); } }
void RewardedVideoAdLoadedEvent(AdmodAdStatusHandler adHandler, object sender, string message, bool success) { if (AdsManager.Debugging && mCurrentDownload != adHandler) { Debug.LogWarning("RewardAds - Return download handler is not same as current download"); } if (mCurrentDownload == adHandler) { AdDownloadCallback(AdsType.RewardedVideo, success, message); } else { adHandler.OnAdAvailabilityUpdate(success); } if (BaseAdsAdapter.AdsAvailableSafeTime <= 0) { if ((object)InternalEventOnRewardAdsChanged != null) { InternalEventOnRewardAdsChanged(); } } else if (success) { if (mRewardedVideoDelayEventChanged != null) { StopCoroutine(mRewardedVideoDelayEventChanged); mRewardedVideoDelayEventChanged = null; } mRewardedVideoDelayEventChanged = CRDelayInternalEventOnRewardAdsChanged(); StartCoroutine(mRewardedVideoDelayEventChanged); } else { if (mRewardedVideoDelayEventChanged != null) { StopCoroutine(mRewardedVideoDelayEventChanged); mRewardedVideoDelayEventChanged = null; } if ((object)InternalEventOnRewardAdsChanged != null) { InternalEventOnRewardAdsChanged(); } } if (AdsManager.Debugging) { Debug.Log(success ? "RewardAds - Request Success" : ("RewardAds - Request Fail - " + message)); } }
//protected override void AdsRequestCallback(AdsType type, bool result) //{ // switch (type) // { // case AdsType.Banner: // break; // case AdsType.Interstitial: // break; // case AdsType.RewardedVideo: // break; // } //} #region BannerAds void BannerAdLoadedEvent(AdmodAdStatusHandler adHandler, object sender, string message, bool success) { if (AdsManager.Debugging && mCurrentDownload != adHandler) { Debug.LogWarning("BannerAds - Return download handler is not same as current download status " + success + " current " + mCurrentDownload + " other " + adHandler); } if (mCurrentDownload == adHandler) { AdDownloadCallback(AdsType.Banner, success, message); } else { adHandler.OnAdAvailabilityUpdate(success); } //if ((object)InternalEventOnBannerAdsChanged != null) //{ // InternalEventOnBannerAdsChanged(); //} if (mBannerAdVisibility) { ShowAdsBanner(); } else { if (AdsManager.EventOnBannerAdsChanged != null) { AdsManager.EventOnBannerAdsChanged(false); } HideAdsBanner(); } if (AdsManager.Debugging) { Debug.Log(success ? "BannerAds - Request Success" : ("BannerAds - Request Fail - " + message)); } }