// Creates FloatAd instance. public FloatAd(string adAppId, string adUnitId, GameObject gameObject, AdOptions adOptions) { client = AtmosplayAdsClientFactory.BuildFloatAdClient(adAppId, adUnitId, gameObject); if (adOptions == null) { adOptions = new AdOptionsBuilder().build(); } client.SetChannelId(adOptions.mChannelId); client.SetAutoloadNext(adOptions.isAutoLoad); client.LoadAd(adUnitId); client.OnAdLoaded += (sender, args) => { if (OnAdLoaded != null) { OnAdLoaded(this, args); } }; client.OnAdFailedToLoad += (sender, args) => { if (OnAdFailedToLoad != null) { OnAdFailedToLoad(this, args); } }; client.OnAdStarted += (sender, args) => { if (OnAdStarted != null) { OnAdStarted(this, args); } }; client.OnAdClicked += (sender, args) => { if (OnAdClicked != null) { OnAdClicked(this, args); } }; client.OnAdRewarded += (sender, args) => { if (OnAdRewarded != null) { OnAdRewarded(this, args); } }; client.OnAdClosed += (sender, args) => { if (OnAdClosed != null) { OnAdClosed(this, args); } }; }
// Creates WindowAd instance. public WindowAd(string adAppId, string adUnitId, GameObject gameObject, AdOptions adOptions) { client = AtmosplayAdsClientFactory.BuildWindowAdClient(adAppId, adUnitId, gameObject); if (adOptions == null) { adOptions = new AdOptionsBuilder().build(); } client.SetChannelId(adOptions.mChannelId); client.OnAdLoaded += (sender, args) => { if (OnAdLoaded != null) { OnAdLoaded(this, args); } }; client.OnAdFailedToLoad += (sender, args) => { if (OnAdFailedToLoad != null) { OnAdFailedToLoad(this, args); } }; client.OnAdStarted += (sender, args) => { if (OnAdStarted != null) { OnAdStarted(this, args); } }; client.OnAdClicked += (sender, args) => { if (OnAdClicked != null) { OnAdClicked(this, args); } }; client.OnAdFinished += (sender, args) => { if (OnAdFinished != null) { OnAdFinished(this, args); } }; client.OnAdClosed += (sender, args) => { if (OnAdClosed != null) { OnAdClosed(this, args); } }; client.OnAdFailToShow += (sender, args) => { if (OnAdFailToShow != null) { OnAdFailToShow(this, args); } }; }
public BannerView(string adAppId, string adUnitId, BannerViewOptions options) { bannerClient = AtmosplayAdsClientFactory.BuildBannerClient(); bannerClient.CreateBannerView(adAppId, adUnitId, options); ConfigureBannerEvents(); }