SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
RaceEventManager Class Reference

This is the interface between the main game and the online implementation. More...

#include <race_event_manager.hpp>

Public Member Functions

void update (int ticks, bool fast_forward)
 In network games this update function is called instead of World::updateWorld().
 
void start (std::shared_ptr< GameEventsProtocol > gep)
 
void stop ()
 
bool isRunning ()
 Returns if this instance is in running state or not.
 
std::shared_ptr< GameEventsProtocolgetProtocol () const
 
bool protocolStopped () const
 
bool isRaceOver ()
 
void kartFinishedRace (AbstractKart *kart, float time)
 

Static Public Member Functions

static RaceEventManagerget ()
 
static void create ()
 
static void destroy ()
 
static void clear ()
 

Private Attributes

bool m_running
 
std::weak_ptr< GameEventsProtocolm_game_events_protocol
 

Detailed Description

This is the interface between the main game and the online implementation.

The main game informs this object about important events (e.g. item collected), which need to be forwarded from the server to all clients. This object then triggers the right message from the various running protocols.

Member Function Documentation

◆ update()

void RaceEventManager::update ( int  ticks,
bool  fast_forward 
)

In network games this update function is called instead of World::updateWorld().

Parameters
ticksNumber of physics time steps - should be 1.
fast_forwardIf true, then only rewinders in network will be updated, but not the physics.

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