#include <src/orxonox/gamestates/GSRoot.h>
Public Member Functions | |
void | activate () |
void | deactivate () |
float | getTimeFactor () |
GSRoot (const GameStateConstrParams ¶ms) | |
void | pause () |
void | setTimeFactor (float factor) |
Changes the speed of Orxonox. | |
void | update (const Clock &time) |
~GSRoot () | |
Private Attributes | |
bool | bPaused_ |
ConsoleCommand * | ccPause_ |
ConsoleCommand * | ccSetTimeFactor_ |
LevelManager * | levelManager_ |
global level manager | |
float | timeFactor_ |
A factor that sets the gamespeed. 1 is normal. | |
float | timeFactorPauseBackup_ |
orxonox::GSRoot::GSRoot | ( | const GameStateConstrParams & | params | ) |
References ccPause_, and ccSetTimeFactor_.
orxonox::GSRoot::~GSRoot | ( | ) |
void orxonox::GSRoot::activate | ( | ) | [virtual] |
Reimplemented from orxonox::GameState.
References orxonox::ConsoleCommand::accessLevel(), orxonox::CommandExecutor::addConsoleCommandShortcut(), ccPause_, ccSetTimeFactor_, orxonox::createConsoleCommand(), orxonox::ConsoleCommand::defaultValue(), orxonox::Game::getInstance(), orxonox::CommandLine::getValue(), levelManager_, orxonox::AccessLevel::Offline, pause(), orxonox::Game::requestState(), orxonox::Game::requestStates(), orxonox::FunctorMember< T >::setObject(), setTimeFactor(), and timeFactor_.
void orxonox::GSRoot::deactivate | ( | ) | [virtual] |
float orxonox::GSRoot::getTimeFactor | ( | ) | [inline] |
void orxonox::GSRoot::pause | ( | ) |
References bPaused_, orxonox::GameMode::isMaster(), setTimeFactor(), timeFactor_, and timeFactorPauseBackup_.
Referenced by activate().
void orxonox::GSRoot::setTimeFactor | ( | float | factor | ) |
Changes the speed of Orxonox.
References bPaused_, orxonox::GameMode::isMaster(), timeFactor_, orxonox::TimeFactorListener::timefactor_s, and timeFactorPauseBackup_.
Referenced by activate(), and pause().
void orxonox::GSRoot::update | ( | const Clock & | time | ) | [virtual] |
bool orxonox::GSRoot::bPaused_ [private] |
Referenced by pause(), and setTimeFactor().
ConsoleCommand* orxonox::GSRoot::ccPause_ [private] |
Referenced by activate(), and GSRoot().
ConsoleCommand* orxonox::GSRoot::ccSetTimeFactor_ [private] |
Referenced by activate(), and GSRoot().
LevelManager* orxonox::GSRoot::levelManager_ [private] |
float orxonox::GSRoot::timeFactor_ [private] |
A factor that sets the gamespeed. 1 is normal.
Referenced by activate(), pause(), and setTimeFactor().
float orxonox::GSRoot::timeFactorPauseBackup_ [private] |
Referenced by pause(), and setTimeFactor().