Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
« A Foolish Consistency | Main | Logitech Harmony One Remote Control Review »
Monday
Dec292008

Back at Work

Number one wife was back at work today. I felt kind of bad about this, and so as a gesture of solidarity I got up with her, had breakfast and spent the entire day writing some XNA stuff. Which turned out to be great fun.

Reader Comments (2)

I still haven't worked out how to centre sprites yet in XNA.

As soon as I do i'll have Pong up and running before you can say, "Halo 3 is a good game!".
January 9, 2009 | Unregistered CommenterJoel Parkey
XNA is fantastic :)

To center a sprite:

sprite.Draw(texture,
new Rectangle(GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width / 2 - (texture.Width / 2), GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / 2 - (texture.Height / 2),
texture.Width,
texture.Height),
Color.White);
January 9, 2009 | Unregistered CommenterWilliam Dann

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.