19#ifndef EASTER_EGG_HUNT_HPP
20#define EASTER_EGG_HUNT_HPP
22#include "modes/linear_world.hpp"
23#include "states_screens/race_gui_base.hpp"
24#include "utils/cpp2011.hpp"
54 virtual void init() OVERRIDE;
59 virtual
void reset(
bool restart=false) OVERRIDE;
63 virtual const std::string&
getIdent() const OVERRIDE;
65 virtual
void update(
int ticks) OVERRIDE;
67 std::vector<
RaceGUIBase::KartIconDisplayInfo> *info) OVERRIDE;
75 void updateKartRanks();
76 void readData(
const std::string &filename);
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
An implementation of World to provide an easter egg hunt like mode.
Definition: easter_egg_hunt.hpp:36
virtual void getKartsDisplayInfo(std::vector< RaceGUIBase::KartIconDisplayInfo > *info) OVERRIDE
Returns the data to display in the race gui.
Definition: easter_egg_hunt.cpp:214
virtual void update(int ticks) OVERRIDE
Update the world and the track.
Definition: easter_egg_hunt.cpp:168
int m_eggs_found
Number of eggs found so far by players.
Definition: easter_egg_hunt.hpp:45
virtual bool raceHasLaps() OVERRIDE
Returns if this race mode has laps.
Definition: easter_egg_hunt.hpp:61
virtual float estimateFinishTimeForKart(AbstractKart *kart) OVERRIDE
In Easter Egg mode the finish time is just the time the race is over, since there are no AI karts and...
Definition: easter_egg_hunt.cpp:248
virtual ~EasterEggHunt()
Destructor.
Definition: easter_egg_hunt.cpp:70
void collectedEasterEggGhost(int world_id)
Called when a ghost kart has collected an egg.
Definition: easter_egg_hunt.cpp:159
int m_number_of_eggs
Overall number of easter eggs.
Definition: easter_egg_hunt.hpp:42
virtual void reset(bool restart=false) OVERRIDE
Called when an egg hunt is restarted.
Definition: easter_egg_hunt.cpp:201
std::vector< int > m_eggs_collected
Keeps track of how many eggs each kart has found.
Definition: easter_egg_hunt.hpp:39
EasterEggHunt()
Constructor.
Definition: easter_egg_hunt.cpp:32
virtual const std::string & getIdent() const OVERRIDE
Returns the internal identifier for this race.
Definition: easter_egg_hunt.cpp:137
virtual void init() OVERRIDE
Initialises the easer egg hunt.
Definition: easter_egg_hunt.cpp:44
void readData(const std::string &filename)
Check if a file easter_eggs.xml exists in the track directory, and if so loads that file and makes th...
Definition: easter_egg_hunt.cpp:78
virtual void checkForWrongDirection(unsigned int i, float dt) OVERRIDE
Override the base class method to change behavior.
Definition: easter_egg_hunt.cpp:233
virtual void collectedItem(const AbstractKart *kart, const ItemState *item) OVERRIDE
Called when a kart has collected an egg.
Definition: easter_egg_hunt.cpp:146
virtual void terminateRace() OVERRIDE
Called at the end of a race.
Definition: easter_egg_hunt.cpp:239
virtual bool isRaceOver() OVERRIDE
The hunt is over once all eggs are found.
Definition: easter_egg_hunt.cpp:177
Contains the state information of an item, i.e.
Definition: item.hpp:53
Definition: linear_world.hpp:36
An abstract base class for the two race guis (race_gui and race_result gui)
Definition: race_gui_base.hpp:50