|
R-Type
Distributed multiplayer game engine in C++
|
Event representing a player input action. More...
#include <InputEvent.hpp>


Public Member Functions | |
| InputEvent (InputAction action, InputState state, uint32_t frameNumber=0) | |
| Construct an input event. | |
| InputAction | getAction () const |
| Get the input action. | |
| InputState | getState () const |
| Get the input state. | |
| uint32_t | getFrameNumber () const |
| Get the frame number. | |
Public Member Functions inherited from IEvent | |
| virtual | ~IEvent ()=default |
| Virtual destructor. | |
Private Attributes | |
| InputAction | _action |
| The action performed. | |
| InputState | _state |
| The state of the input. | |
| uint32_t | _frameNumber |
| Frame number for network synchronization. | |
Event representing a player input action.
InputEvent encapsulates all information about a player input:
This event is used throughout the system:
Definition at line 58 of file InputEvent.hpp.
|
inline |
Construct an input event.
| action | The player action (MOVE_UP, SHOOT, etc.) |
| state | The input state (PRESSED, RELEASED, HELD) |
| frameNumber | Frame number for network sync (default: 0) |
Definition at line 67 of file InputEvent.hpp.
|
inline |
Get the input action.
Definition at line 74 of file InputEvent.hpp.
References _action.
|
inline |
Get the frame number.
Definition at line 86 of file InputEvent.hpp.
References _frameNumber.
|
inline |
Get the input state.
Definition at line 80 of file InputEvent.hpp.
References _state.
|
private |
|
private |
Frame number for network synchronization.
Definition at line 91 of file InputEvent.hpp.
Referenced by getFrameNumber().
|
private |