I'm using XNA 2.0 Game Studio, and I can't figure out how to get user input from Mouse and keyboard. I don't really care about Xbox 360 input, as I'm going to be mostly working with Computer games. Can anyone find me/write a tutorials for me about how to do this please? Thanks for the Help.
XNA User Input
Page 1 of 13 Replies - 4761 Views - Last Post: 23 June 2008 - 09:35 AM
Replies To: XNA User Input
#2
Re: XNA User Input
Posted 22 June 2008 - 11:12 PM
The best resource I've found for most dev with XNA is XNA's creator site:
http://www.creators.xna.com/
They have tutorials and walk throughs for almost anything.
Also (I'm assuming you are using VS C#) you can go to [Menu] -> Help -> Content
There is an XNA tab in there with a lot of beginner info.
http://www.creators.xna.com/
They have tutorials and walk throughs for almost anything.
Also (I'm assuming you are using VS C#) you can go to [Menu] -> Help -> Content
There is an XNA tab in there with a lot of beginner info.
#3
Re: XNA User Input
Posted 23 June 2008 - 03:34 AM
In your Update event, call the Keyboard.GetState().IsKeyDown() method to check if a key has been pressed. Example:
Hope that helps.
if(Keyboard.GetState().IsKeyDown(Keys.Escape))
{
// hac into da world yo.
}
Hope that helps.
This post has been edited by RodgerB: 23 June 2008 - 03:34 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|