ArnieBoids
1.0.0
JOINT AI PROJECT
|
Keyboard handler class. Holds and handles all key inputs. Should be updated with game and then queried for keys. More...
#include <KeyInput.hpp>
Public Member Functions | |
KeyInput () | |
void | update () |
Updates all keys. More... | |
bool | isKeyDown (const Key key) const |
Is a key down. More... | |
bool | isKeyUp (const Key key) const |
Is a key up. More... | |
bool | isKeyPressed (const Key key) const |
Has a key just been pressed. More... | |
bool | isKeyReleased (const Key key) const |
Has a key just been released. More... | |
Private Member Functions | |
bool | checkKeyDown (list< Key > list, Key key) const |
Private Attributes | |
list< Key > | curKeys_ |
list< Key > | prvKeys_ |
Keyboard handler class. Holds and handles all key inputs. Should be updated with game and then queried for keys.
KeyInput::KeyInput | ( | ) |
bool KeyInput::isKeyDown | ( | const Key | key | ) | const |
Is a key down.
bool KeyInput::isKeyPressed | ( | const Key | key | ) | const |
Has a key just been pressed.
bool KeyInput::isKeyReleased | ( | const Key | key | ) | const |
Has a key just been released.
bool KeyInput::isKeyUp | ( | const Key | key | ) | const |
Is a key up.
void KeyInput::update | ( | ) |
Updates all keys.
|
private |
|
private |