18 #ifndef _follow_the_leader_hpp_ 19 #define _follow_the_leader_hpp_ 21 #include "modes/linear_world.hpp" 31 std::vector<float> m_leader_intervals;
49 virtual
void reset(
bool restart=false) OVERRIDE;
50 virtual const
std::
string&
getIdent() const OVERRIDE;
54 virtual
void init() OVERRIDE;
64 bool isLeader(
int kart_id) {
return (kart_id == 0); }
float m_last_eliminated_time
Time the last kart was eliminated.
Definition: follow_the_leader.hpp:38
virtual bool isRaceOver() OVERRIDE
The follow the leader race is over if there is only one kart left (plus the leader), or if all (human) players have been eliminated.
Definition: follow_the_leader.cpp:204
An abstract base class for the two race guis (race_gui and race_result gui)
Definition: race_gui_base.hpp:49
virtual int getScoreForPosition(int p) OVERRIDE
Returns the number of points for a kart at a specified position.
Definition: follow_the_leader.cpp:98
virtual bool useFastMusicNearEnd() const OVERRIDE
Returns if faster music should be used at the end.
Definition: follow_the_leader.hpp:62
virtual bool raceHasLaps() OVERRIDE
Returns if this type of race has laps.
Definition: follow_the_leader.hpp:59
virtual void reset(bool restart=false) OVERRIDE
Called just before a race is started.
Definition: follow_the_leader.cpp:79
float m_is_over_delay
A timer used before terminating the race.
Definition: follow_the_leader.hpp:34
void leaderHit()
If the leader kart is hit, increase the delay to the next elimination.
Definition: follow_the_leader.cpp:227
virtual void countdownReachedZero() OVERRIDE
Called when a kart must be eliminated.
Definition: follow_the_leader.cpp:123
virtual const btTransform & getStartTransform(int index) OVERRIDE
Returns the start coordinates for a kart with a given index.
Definition: follow_the_leader.cpp:109
virtual void terminateRace() OVERRIDE
Called at the end of a race.
Definition: follow_the_leader.cpp:240
virtual const std::string & getIdent() const OVERRIDE
Returns the internal identifier for this kind of race.
Definition: follow_the_leader.cpp:284
virtual void getKartsDisplayInfo(std::vector< RaceGUIBase::KartIconDisplayInfo > *info) OVERRIDE
Sets the title for all karts that is displayed in the icon list.
Definition: follow_the_leader.cpp:293
An implementation of World, based on LinearWorld, to provide the Follow-the-leader game mode...
Definition: follow_the_leader.hpp:27
Definition: linear_world.hpp:35
virtual void init() OVERRIDE
Called immediately after the constructor.
Definition: follow_the_leader.cpp:56