Game Development Reference
In-Depth Information
public bool IsDisposed
{
get
{
return m_bDisposed;
}
}
public Keyboard Keyboard
{
get
{
return m_Keyboard;
}
}
With this class now finished, we just need to modify our GameWindow class to make
use of it now.
Updating the GameWindow class
The first thing we need to do now is add a using statement to the top of the
GameWindow.cs file:
using SlimDX.DirectInput;
This will allow us to use the Key enumeration to specify which keys we want to
check. Next, we need to add a new member variable to our GameWindow class. This
variable will be called m_UserInput and it will contain our new UserInput object
that we just finished creating. The declaration of this member variable looks like the
following code:
private UserInput m_UserInput;
Search WWH ::




Custom Search