示例#1
0
    private void OnBannerAdOpened(string bannerID)
    {
        int         id     = System.Convert.ToInt32(bannerID);
        IOSADBanner banner = GetBanner(id) as IOSADBanner;

        if (banner != null)
        {
            banner.OnBannerAdOpened();
        }
    }
示例#2
0
    private void OnBannerAdLeftApplication(string bannerID)
    {
        int         id     = System.Convert.ToInt32(bannerID);
        IOSADBanner banner = GetBanner(id) as IOSADBanner;

        if (banner != null)
        {
            banner.OnBannerAdLeftApplication();
        }
    }
示例#3
0
    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);
    }
示例#4
0
    //--------------------------------------
    //  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();
        }
    }
示例#5
0
 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();
             }
         }
     }
 }