XNA AdGameComponent does not draw

Posted by Alex Shkor on Stack Overflow See other posts from Stack Overflow or by Alex Shkor
Published on 2011-11-25T17:34:49Z Indexed on 2011/11/29 9:50 UTC
Read the original article Hit count: 164

Filed under:
|
|
|
|

I have following code. But AddGameComponent doesn't draw.

   protected override void Initialize()
    {
        // TODO: Add your initialization logic here
        base.Initialize();
        var li = new LicenseInformation();
        IsTrial = li.IsTrial();
        if (IsTrial)
        {
            AdGameComponent.Initialize(this, AppID);
            Components.Add(AdGameComponent.Current);
            CreateAd();
        }
    }


   private void CreateAd()
    {
        bannerAd = AdGameComponent.Current.CreateAd(AdUnitID, new Rectangle(x, y, width, height), true);
        AdGameComponent.Current.Enabled = true;
    }

I have tried to set DrawOrder to 1000, but ads still doesn't work.

© Stack Overflow or respective owner

Related posts about c#

Related posts about windows-phone-7