|
R-Type
Distributed multiplayer game engine in C++
|
Event triggered when the game ends. More...
#include <GameEndedEvent.hpp>


Public Member Functions | |
| GameEndedEvent (const std::string &reason="") | |
| Construct a GameEndedEvent. | |
| ~GameEndedEvent () override=default | |
| const std::string & | getReason () const |
| Get the reason for game ending. | |
Public Member Functions inherited from server::GameEvent | |
| GameEvent (Type type) | |
| virtual | ~GameEvent () override=default |
| Type | getType () const |
| Get the type of the event. | |
Public Member Functions inherited from server::IEvent | |
| IEvent ()=default | |
| virtual | ~IEvent ()=default |
Private Attributes | |
| std::string | _reason |
Additional Inherited Members | |
Public Types inherited from server::GameEvent | |
| enum class | Type { UNKNOWN , PLAYER_JOINED , PLAYER_LEFT , SCORE_UPDATED , GAME_STARTED , GAME_ENDED , PROJECTILE_CREATED } |
Event triggered when the game ends.
Definition at line 18 of file GameEndedEvent.hpp.
|
inlineexplicit |
Construct a GameEndedEvent.
| reason | Reason for game ending (e.g., "Victory", "Defeat", "Timeout") |
Definition at line 24 of file GameEndedEvent.hpp.
|
overridedefault |
|
inline |
Get the reason for game ending.
Definition at line 32 of file GameEndedEvent.hpp.
References _reason.
|
private |
Definition at line 35 of file GameEndedEvent.hpp.
Referenced by getReason().