I just begun learning XNA 4.0 and I have a question. I created a sprite and I need to rotate it when a specific event occurs. I would also like to know how to rescale that same sprite while in the middle of the game. I tried this:
Texture2D theSprite;
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend);
if (direction=="right")
{
spriteBatch.Draw(theSprite, spritePosition, null, Color.White, 0, new Vector2(0, 0), .7f, SpriteEffects.None, 0);
}
But it changes the sprite's position and I'm guessing there has to be a better way, right?
Thanks!