private void OnBannerAdOpened(string bannerID) { int id = System.Convert.ToInt32(bannerID); IOSADBanner banner = GetBanner(id) as IOSADBanner; if (banner != null) { banner.OnBannerAdOpened(); } }
private void OnBannerAdLeftApplication(string bannerID) { int id = System.Convert.ToInt32(bannerID); IOSADBanner banner = GetBanner(id) as IOSADBanner; if (banner != null) { banner.OnBannerAdLeftApplication(); } }
public GoogleMobileAdBanner CreateAdBanner(int x, int y, GADBannerSize size) { if (!IsInited) { Debug.LogWarning("CreateBannerAd shoudl be called only after Init function. Call ignored"); return(null); } IOSADBanner bannner = new IOSADBanner(x, y, size, GADBannerIdFactory.nextId); _banners.Add(bannner.id, bannner); return(bannner); }
//-------------------------------------- // EVENTS BANNER AD //-------------------------------------- private void OnBannerAdLoaded(string data) { string[] bannerData; bannerData = data.Split(AndroidNative.DATA_SPLITTER [0]); int id = System.Convert.ToInt32(bannerData[0]); int w = System.Convert.ToInt32(bannerData[1]); int h = System.Convert.ToInt32(bannerData[2]); IOSADBanner banner = GetBanner(id) as IOSADBanner; if (banner != null) { banner.SetDimentions(w, h); banner.OnBannerAdLoaded(); } }
public void DestroyBanner(int id) { if (_banners != null) { if (_banners.ContainsKey(id)) { IOSADBanner banner = _banners[id]; if (banner.IsLoaded) { _banners.Remove(id); #if (UNITY_IPHONE && !UNITY_EDITOR && !CODE_DISABLED) || SA_DEBUG_MODE _GADDestroyBanner(id); #endif } else { banner.DestroyAfterLoad(); } } } }