![]() |
Dauphine
0.1
A platforming/stealth game in a medieval fantasy setting, developed with SDL2.
|
Handles player input. More...
#include <InputHandler.h>
Public Member Functions | |
| InputHandler () | |
| The constructor. More... | |
| ~InputHandler () | |
| The destructor. More... | |
| void | handleInput () |
| Handles the input. More... | |
| std::array< bool, GameKeys::MAX > | getKeyStates () |
| bool | isQuitFlag () |
Private Member Functions | |
| void | signalExit () |
| Sets InputHandler::quitFlag to true. | |
Private Attributes | |
| ControllerHandler * | controllerHandler |
| Handles input if joystick is present. More... | |
| std::array< bool, GameKeys::MAX > | keyStates |
Boolean array that controls which keys are pressed or not. More... | |
| SDL_Event | sdlEvent |
| SDL internal event structure. More... | |
| bool | quitFlag |
| If the quit signal was recieved or not. More... | |
Handles player input.
Using SDL event handling, recieves the player input accordingly.
| InputHandler::InputHandler | ( | ) |
The constructor.
Used to create the input handler instance.
| InputHandler::~InputHandler | ( | ) |
The destructor.
Deletes the InputHandler instance.
| std::array< bool, GameKeys::MAX > InputHandler::getKeyStates | ( | ) |
| void InputHandler::handleInput | ( | ) |
Handles the input.
Detects the pending events, and handles them appropriately.
| bool InputHandler::isQuitFlag | ( | ) |
|
private |
Handles input if joystick is present.
|
private |
Boolean array that controls which keys are
pressed or not.
|
private |
If the quit signal was recieved or not.
|
private |
SDL internal event structure.
1.8.4