|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
Control | Control class which can be extended to create control schemes. |
KeyboardControl | Built-in example of how to extend Control class properly. |
MouseControl | Built-in example of how to extend Control class properly. |
PreferencesState |
Creates control schemes by mapping inputs from any kind of peripheral devices to actions/behaviors of one or more GameEntitySprites.
Authors: Aaron Choi, Adam Cue, Nick Hawthorne
Control is the main workhorse of this API. Any developer that wants to enjoy the benefits of this Vooga API will subclass Control to add whatever peripheral-specific logic is necessary to register the inputs and their corresponding methods. The subclasses in most cases should only have to override the update method so it can perform whatever logic it needs to to pass the input into Control.
KeyboardControl and MouseControl are two examples of these Control subclasses. While being examples of how to use this API, they are also fully functional keyboard and mouse listeners, meaning that if there are basic keyboard/mouse mappings that you want to do, KeyboardControl and MouseControl should be sufficient.
PreferencesState is a GameState that allows the user to change the input mappings during the game. This would most likely be in some sort of preference pane but the decision is completely up to the developer. Also, PreferencesState can be extended and modified to fit whatever peripheral device whose input the user wishes to remap.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |