1#ifndef GAME_EVENTS_PROTOCOL_HPP
2#define GAME_EVENTS_PROTOCOL_HPP
5#include "utils/cpp2011.hpp"
12 enum GameEventType : uint8_t
14 GE_KART_FINISHED_RACE = 1,
16 GE_BATTLE_KART_SCORE = 3,
23 int m_last_finished_position;
34 void sendStartupBoost(uint8_t kart_id);
35 virtual void setup() OVERRIDE {}
36 virtual void update(
int ticks) OVERRIDE;
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Class representing an event that need to pass trough the system. This is used to remove ENet dependen...
Definition: event.hpp:73
Definition: game_events_protocol.hpp:10
void kartFinishedRace(AbstractKart *kart, float time)
This function is called from the server when a kart finishes a race.
Definition: game_events_protocol.cpp:161
GameEventsProtocol()
This class handles all 'major' game events.
Definition: game_events_protocol.cpp:31
virtual void setup() OVERRIDE
Called when the protocol is going to start.
Definition: game_events_protocol.hpp:35
virtual bool notifyEvent(Event *event) OVERRIDE
Notify a protocol matching the Event type of that event.
Definition: game_events_protocol.cpp:49
virtual bool notifyEventAsynchronous(Event *event) OVERRIDE
Notify a protocol matching the Event type of that event.
Definition: game_events_protocol.hpp:39
virtual void asynchronousUpdate() OVERRIDE
Called by the protocol listener as often as possible.
Definition: game_events_protocol.hpp:37
virtual void update(int ticks) OVERRIDE
Called by the protocol listener, synchronously with the main loop.
Definition: game_events_protocol.cpp:42
A new implementation of NetworkString, which has a fixed format: Byte 0: The type of the message,...
Definition: network_string.hpp:422
Abstract class used to define the global protocol functions.
Definition: protocol.hpp:92
Generic protocols declarations.