#include <qafPlatformerObj.h>
When a PlatformerObj
is created, it must receive a pointer to one of these structures. Its state will be read in the PlatformerObj::update()
method, and the key states will be used to update the character's position and direction.
Public Member Functions | |
PlatformerInput () | |
The constructor sets all key states to false. | |
Public Attributes | |
bool | left |
Directional input: Set to true when the LEFT/RIGHT/DOWN buttons are pressed. | |
bool | right |
bool | down |
bool | jumpPress |
This should be set to true in the frame when the JUMP button is pressed, and set to false in the next frame. | |
bool | jump |
This should be set to true as long as JUMP is kept pressed. |
Directional input: Set to true when the LEFT/RIGHT/DOWN buttons are pressed.
This should be set to true in the frame when the JUMP button is pressed, and set to false in the next frame.
This should be set to true as long as JUMP is kept pressed.