locked
How to draw ontop of your ads! RRS feed

  • General discussion

  • Ok so my add wasnt being drawn and then I thought hey sense its being drawn in the base.draw function then why not do this...
    protected override void Draw(GameTime gameTime)  
    {  
       GraphicsDevice.Clear(color.CornflowerBlue);  
       spriteBatch.Begin();  
       objmanager.Draw(spriteBatch, gameTime);  
       base.Draw(gameTime);  
       spriteBatch.End();  
    Wednesday, November 16, 2011 6:17 AM

All replies

  • The ads are drawn with DrawableGameComponents.  They have a DrawOrder property that you can change to modify the draw order of components.

    The call to base.Draw() should be after the spritebatch Begin/End pair, not within.
    Wednesday, November 16, 2011 7:10 AM
  • did not kow there was such a thing as a draw order for the ads.
    Thursday, November 17, 2011 8:29 PM