public void Initialize(AdsMaster manager) { this.manager = manager; // Only init if provider is assigned to load any ad. if ((IsSupport(AdType.Interstitial) && AdsMaster.IsAllowedInterstitial(ID)) || (IsSupport(AdType.Rewarded) && AdsMaster.IsAllowedReward(ID)) || (IsSupport(AdType.Banner) && AdsMaster.IsAllowedBanner(ID))) { OnIntialize(); } }
void Init() { if (!AdsMaster.SupportedAdPlatform) { return; } if (!AdsMaster.IsAllowedReward(providerId) || !IsValidConfiguration()) { return; } resendTime = new WaitForSeconds(AdsMaster.RESEND_FAILED_REQUEST_DELAY); OnInitialize(); SendRequest(); }
protected override void OnIntialize() { Chartboost.didCacheInterstitial += didCacheInterstitial; Chartboost.didFailToLoadInterstitial += didFailToLoadInterstitial; Chartboost.didDismissInterstitial += didDismissInterstitial; Chartboost.didCloseInterstitial += didCloseInterstitial; Chartboost.didCacheRewardedVideo += didCacheRewardedVideo; Chartboost.didFailToLoadRewardedVideo += didFailToLoadRewardedVideo; Chartboost.didCloseRewardedVideo += didCloseRewardedVideo; Chartboost.didDismissRewardedVideo += didDismissRewardedVideo; Chartboost.didCompleteRewardedVideo += didCompleteRewardedVideo; if (AdsMaster.IsAllowedReward(ProviderID.ChartBoost)) { StartCoroutine(CacheRewardTask(2f)); } if (AdsMaster.IsAllowedInterstitial(ProviderID.ChartBoost)) { StartCoroutine(CacheInterstitialTask(0f)); } }