19#ifndef HEADER_DEMO_WORLD_HPP
20#define HEADER_DEMO_WORLD_HPP
22#include "modes/profile_world.hpp"
76 static void setTracks(
const std::vector<std::string> &tracks);
This class is used to show a demo of STK (e.g.
Definition: demo_world.hpp:32
static float m_max_idle_time
Idle time after which demo mode should be started.
Definition: demo_world.hpp:46
static void setTracks(const std::vector< std::string > &tracks)
Sets the list of tracks that is to be used.
Definition: demo_world.cpp:100
virtual bool isRaceOver() OVERRIDE
The race is over if either the requested number of laps have been done or the requested time is over.
Definition: demo_world.cpp:109
static int m_default_num_karts
Number of karts to use in demo mode.
Definition: demo_world.hpp:43
void abortDemo()
Signals that the demo should be aborted.
Definition: demo_world.hpp:90
virtual void update(int ticks) OVERRIDE
Counts the number of frames.
Definition: demo_world.hpp:62
static float m_current_idle_time
Used by the menu system to measure idle time.
Definition: demo_world.hpp:49
virtual std::string getInternalCode() const OVERRIDE
Returns identifier for this world.
Definition: demo_world.hpp:60
static void resetIdleTime()
Resets the idle time to 0.
Definition: demo_world.hpp:87
static bool isDemoMode()
Returns true if the menu detected enough idle time to run a demo.
Definition: demo_world.hpp:84
static void setNumKarts(unsigned int num_karts)
Sets the number of karts to use in demo mode.
Definition: demo_world.hpp:71
static void enableDemoMode(float time=1.0f)
Enables demo mode after the specified amount of time (default 1 second).
Definition: demo_world.hpp:81
virtual void enterRaceOverState() OVERRIDE
This function is called when the race is finished, but end-of-race animations have still to be played...
Definition: demo_world.cpp:122
bool m_abort
True if demo mode should be aborted, e.g.
Definition: demo_world.hpp:36
static std::vector< std::string > m_demo_tracks
The list of tracks to use for demo mode.
Definition: demo_world.hpp:40
static bool updateIdleTimeAndStartDemo(float dt)
Updates the current idle time by dt.
Definition: demo_world.cpp:134
virtual ~DemoWorld()
Destructor.
Definition: demo_world.cpp:90
static void setNumLaps(unsigned int num_laps)
Sets the number of laps to use in demo mode.
Definition: demo_world.hpp:68
static bool m_do_demo
True if the next race is to be a demo race.
Definition: demo_world.hpp:52
DemoWorld()
The constructor sets the number of (local) players to 0, since only AI karts are used.
Definition: demo_world.cpp:43
The main kart class.
Definition: kart.hpp:69
An implementation of World, used for profiling only.
Definition: profile_world.hpp:31
static int m_num_laps
In laps based profiling: number of laps to run.
Definition: profile_world.hpp:69
virtual void update(int ticks)
Counts the number of frames.
Definition: profile_world.cpp:155