Game Development Reference
In-Depth Information
Figure 9.13
Creating a new project subfolder.
similar to Figure 9.14. Anytime you create a new class in the Input folder it will
automatically use the namespace
Engine.Input
. The classes we've just added
however need their namespaces changed manually. For each of the classes,
change the line
namespace Engine
to
namespace Engine.Input
.
Try running the code. There will probably be a few errors complaining that the
input classes cannot be found. To resolve these errors, add the statement
using
Engine.Input;
to the top of the file.
Finally, the controller should be added to the
Input
class. In this case the
Xbox 360 controller is used and the assumption is that if any user wants to use
a different controller, it will have equivalent functionality to an Xbox 360
controller.
Search WWH ::
Custom Search