Search Results

Search found 1 results on 1 pages for 'wellie'.

Page 1/1 | 1 

  • Position sprite at center of screen

    - by Wellie
    I am trying to get a sprite to position itself at the center of the screen but nothing seems to be working for me. I'm trying Viewport viewport = graphics.GraphicsDevice.Viewport; logoPosition = new Vector2((viewport.Width - towerImage.Width) / 2, (viewport.Height - towerImage.Height) / 2); and spriteBatch.Draw(towerImage, centre, null, Color.White, 0, baseOrigin, 1.0f, SpriteEffects.None, 0); This is my first time using XNA and I don't really have a clue what I'm doing.

    Read the article

1