This is how I'm drawing a sprite right now.
spriteBatch.Draw(tex, i.location, null, Color.White, i.Angle(), new Vector2(0, 0), SpriteEffects.None, 100f);
Pay attention to the i.location.
I get this error when I try to run.
Error 2 Argument '2': cannot convert from 'Microsoft.Xna.Framework.Vector2' to 'Microsoft.Xna.Framework.Rectangle' D:\Users\Ronnie\Documents\Visual Studio 2008\Projects\GameTests\GameTests\Game1.cs 85 39 GameTests
Its saying I need a rectangle where i.location is even though its supposed to be a vector2.
Any help is appreciated I don't get why it won't work at all. Its giving me a massive headache.
Here's my complete draw method.
spriteBatch.Begin();
foreach (Bullet i in bullets)
{
Texture2D tex = Content.Load<Texture2D>("bullet");
spriteBatch.Draw(tex, i.location, null, Color.White, i.Angle(), new Vector2(0, 0),
SpriteEffects.None, 100f);
}
// TODO: Add your drawing code here
spriteBatch.End();
I can get it to work like this.
spriteBatch.Draw(tex, i.location, null, Color.White);[code]
[/code]