Orxonox: orxonox::GSRoot Class Reference

# orxonox::GSRoot Class Reference

`#include <src/orxonox/gamestates/GSRoot.h>`

Inheritance diagram for orxonox::GSRoot:

List of all members.

## Public Member Functions

void | activate ()
void | deactivate ()
float | getTimeFactor ()
| GSRoot (const GameStateConstrParams &params)
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_

## Constructor & Destructor Documentation

orxonox::GSRoot::GSRoot | ( | const GameStateConstrParams & | params | ) |

References ccPause_, and ccSetTimeFactor_.

orxonox::GSRoot::~GSRoot | ( |  | ) |

References orxonox::NetworkFunctionBase::destroyAllNetworkFunctions().

## Member Function Documentation

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]`

Reimplemented from orxonox::GameState.

References levelManager_.

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]`

Reimplemented from orxonox::GameState.

References orxonox::Game::addTickTime(), orxonox::GameState::getActivity(), orxonox::Clock::getDeltaTime(), orxonox::Game::getInstance(), orxonox::Clock::getRealMicroseconds(), and orxonox::Game::requestState().

## Member Data Documentation

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]`

global level manager

Referenced by activate(), and deactivate().

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().

The documentation for this class was generated from the following files:

- src/orxonox/gamestates/GSRoot.h
- src/orxonox/gamestates/GSRoot.cc