public override void fetchBanner(AdvertisementManager.Positions pos)
    {
        try
        {
            base.fetchBanner(pos);

            if (Info.IsEditor() || (firstTime && !Setup()))
            {
                return;
            }

                        #if UNITY_IPHONE
            ScreenOrientation or;

            if (pos == AdvertisementManager.Positions.BOTTOM)
            {
                or = Screen.orientation;
            }
            else
            {
                switch (Screen.orientation)
                {
                case ScreenOrientation.Portrait: or = ScreenOrientation.PortraitUpsideDown; break;

                case ScreenOrientation.PortraitUpsideDown: or = ScreenOrientation.Portrait; break;

                case ScreenOrientation.LandscapeLeft: or = ScreenOrientation.LandscapeRight; break;

                case ScreenOrientation.LandscapeRight: or = ScreenOrientation.LandscapeLeft; break;

                default: or = ScreenOrientation.PortraitUpsideDown; break;
                }
            }

            ScreenOrientation[] ors = new ScreenOrientation[1] {
                or
            };

            banner = instance.CreateBanner(null, ors);
                        #endif
        }
        catch
        {
            Error(API, ERROR_LOADING_BANNER);
        }
    }
    // Obtem o banner
    public static void fetchBanner(AdvertisementManager.Positions pos)
    {
        if (!AdvertisementManager.isEnabled())
        {
            return;
        }

        if (Info.IsEditor() || AdvertisementManager.manager.banner == null)
        {
            if (Info.IsEditor())
            {
                return;
            }
        }

        foreach (AdvertisementBase ad in AdvertisementManager.manager.banner)
        {
            ad.fetchBanner(pos);
        }
    }
Beispiel #3
0
    public override void fetchBanner(AdvertisementManager.Positions pos)
    {
        try
        {
            base.fetchBanner(pos);

            if (Info.IsEditor() || !Info.IsPlatform(Info.Platform.iPhone) || (firstTime && !Setup()))
            {
                return;
            }

                        #if UNITY_IPHONE
            on_bottom = pos == AdvertisementManager.Positions.BOTTOM;
                        #endif
        }
        catch
        {
            Error(API, ERROR_LOADING_BANNER);
        }
    }
    public override void fetchBanner(AdvertisementManager.Positions pos)
    {
        try
        {
            base.fetchBanner(pos);

            if (Info.IsEditor())
            {
                return;
            }

                        #if UNITY_ANDROID
            if (pos == AdvertisementManager.Positions.BOTTOM)
            {
                placement = FlurryAdPlacement.BannerBottom;
            }
            else
            {
                placement = FlurryAdPlacement.BannerTop;
            }

            FlurryAndroid.fetchAdsForSpace(banner_id, placement);
                        #elif UNITY_IPHONE
            if (pos == AdvertisementManager.Positions.BOTTOM)
            {
                placement = FlurryAdSize.Bottom;
            }
            else
            {
                placement = FlurryAdSize.Top;
            }

            FlurryBinding.fetchAdForSpace(banner_id, placement);
                        #endif
        }
        catch
        {
            Error(API, ERROR_LOADING_BANNER);
        }
    }
    public override void fetchBanner(AdvertisementManager.Positions pos)
    {
        try
        {
            base.fetchBanner(pos);

            if (Info.IsEditor() || (firstTime && !Setup()))
            {
                return;
            }

                        #if UNITY_ANDROID
            placement = (pos == AdvertisementManager.Positions.BOTTOM)
                                        ? AdMobAdPlacement.BottomCenter
                                        : AdMobAdPlacement.TopCenter;
                        #endif
        }
        catch
        {
            Error(API, ERROR_LOADING_BANNER);
        }
    }
Beispiel #6
0
 // Obtem o banner
 public virtual void fetchBanner(AdvertisementManager.Positions pos)
 {
 }