SuperTuxKart
lap_trial.hpp
1 // SuperTuxKart - a fun racing game with go-kart
2 // Copyright (C) 2004-2015 SuperTuxKart-Team
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 3
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 
18 #ifndef HEADER_LAP_TRIAL_HPP
19 #define HEADER_LAP_TRIAL_HPP
20 
21 #include "modes/linear_world.hpp"
22 
23 class LapTrial : public LinearWorld
24 {
25 protected:
26  virtual bool isRaceOver() OVERRIDE;
27 public:
28  LapTrial();
29  virtual void countdownReachedZero() OVERRIDE;
30  virtual void reset(bool restart = false) OVERRIDE;
31  virtual void update(int ticks) OVERRIDE;
32  virtual void terminateRace() OVERRIDE;
33  virtual const std::string& getIdent() const OVERRIDE { return IDENT_LAP_TRIAL; }
34  virtual bool showLapsTarget() OVERRIDE { return false; }
35  virtual void getKartsDisplayInfo(std::vector<RaceGUIBase::KartIconDisplayInfo>* icons) OVERRIDE;
36 private:
37  bool m_count_down_reached_zero;
38 };
39 
40 #endif
Definition: lap_trial.hpp:24
virtual void update(int ticks) OVERRIDE
General update function called once per frame.
Definition: lap_trial.cpp:83
virtual void terminateRace() OVERRIDE
Called at the end of a race.
Definition: lap_trial.cpp:88
virtual const std::string & getIdent() const OVERRIDE
Each game mode should have a unique identifier.
Definition: lap_trial.hpp:33
virtual void reset(bool restart=false) OVERRIDE
Called before a race is started (or restarted).
Definition: lap_trial.cpp:76
virtual void getKartsDisplayInfo(std::vector< RaceGUIBase::KartIconDisplayInfo > *icons) OVERRIDE
Called by the code that draws the list of karts on the race GUI to know what needs to be drawn in the...
Definition: lap_trial.cpp:43
virtual void countdownReachedZero() OVERRIDE
Will be called to notify your derived class that the clock, which is in COUNTDOWN mode,...
Definition: lap_trial.cpp:36
virtual bool isRaceOver() OVERRIDE
Returns true if the race is over.
Definition: lap_trial.cpp:31
virtual bool showLapsTarget() OVERRIDE
If true lap counter shows lap count in format: 4/20 or if false then in format: 4.
Definition: lap_trial.hpp:34
Definition: linear_world.hpp:36