
For instance,
I made this sprite sheet for my project, do I have to do anything special with my image so it works well with XNA?




Posted 16 June 2009 - 12:09 PM

Posted 16 June 2009 - 01:00 PM
Posted 16 June 2009 - 01:13 PM
Posted 16 June 2009 - 01:17 PM
Posted 16 June 2009 - 01:28 PM
Posted 16 June 2009 - 01:58 PM
Posted 16 June 2009 - 03:54 PM
Posted 16 June 2009 - 06:15 PM
papuccino1, on 16 Jun, 2009 - 04:54 PM, said:

Rectangle[] spriteSheet = new Rectangle[6];
for (int i = 0; i < 6; i++)
{
spriteSheet[i] = new Rectancle(
i * WidthofSprite,
0,
WidthofSprite,
HeightofSprite);
}
Posted 16 June 2009 - 06:41 PM
Posted 16 June 2009 - 06:55 PM
papuccino1, on 16 Jun, 2009 - 07:41 PM, said:
List<Texture2D> LeftFacingSpriteFrames = new List<Texture2D>(); // Class level variable
// Inside the LoadContent method:
Texture2D tempTexture;
tempTexture = Content.Load<Texture2D>("leftFrame0");
LeftFacingSpriteFrames.Add(tempTexture);
tempTexture = Content.Load<Texture2D>("leftFrame1");
LeftFacingSpriteFrames.Add(tempTexture);
// Repeat for all other left facing frames
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
