R-Type
Distributed multiplayer game engine in C++
Loading...
Searching...
No Matches
server::GameStartedEvent Class Reference

Event triggered when the game starts in a specific room. More...

#include <GameStartedEvent.hpp>

Inheritance diagram for server::GameStartedEvent:
Inheritance graph
Collaboration diagram for server::GameStartedEvent:
Collaboration graph

Public Member Functions

 GameStartedEvent (const std::string &roomId="")
 
 ~GameStartedEvent () override=default
 
const std::string & getRoomId () const
 Get the room ID where the game started.
 
- 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 _roomId
 

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
}
 

Detailed Description

Event triggered when the game starts in a specific room.

Definition at line 19 of file GameStartedEvent.hpp.

Constructor & Destructor Documentation

◆ GameStartedEvent()

server::GameStartedEvent::GameStartedEvent ( const std::string &  roomId = "")
inlineexplicit

Definition at line 21 of file GameStartedEvent.hpp.

◆ ~GameStartedEvent()

server::GameStartedEvent::~GameStartedEvent ( )
overridedefault

Member Function Documentation

◆ getRoomId()

const std::string & server::GameStartedEvent::getRoomId ( ) const
inline

Get the room ID where the game started.

Returns
Room ID string

Definition at line 29 of file GameStartedEvent.hpp.

References _roomId.

Member Data Documentation

◆ _roomId

std::string server::GameStartedEvent::_roomId
private

Definition at line 32 of file GameStartedEvent.hpp.

Referenced by getRoomId().


The documentation for this class was generated from the following file: