- Timestamp:
- Oct 27, 2008, 10:56:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/gamestates/GSStandalone.cc
r1989 r2023 30 30 #include "GSStandalone.h" 31 31 32 #include "core/input/InputManager.h"33 #include "core/ConsoleCommand.h"34 32 #include "core/Core.h" 35 33 … … 37 35 { 38 36 GSStandalone::GSStandalone() 39 : G SLevel("standalone")37 : GameState<GSGraphics>("standalone") 40 38 { 41 39 } … … 47 45 void GSStandalone::enter() 48 46 { 49 GSLevel::enter();47 Core::setIsStandalone(true); 50 48 51 Core::setIsStandalone(true); 52 this->loadLevel(); 53 54 // add console commands 55 FunctorMember<GSLevel>* functor = createFunctor(&GSLevel::setTimeFactor); 56 functor->setObject(this); 57 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor, "setTimeFactor")).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);; 58 59 // level is loaded: we can start capturing the input 60 InputManager::getInstance().requestEnterState("game"); 49 GSLevel::enter(this->getParent()->getViewport()); 61 50 } 62 51 63 52 void GSStandalone::leave() 64 53 { 65 InputManager::getInstance().requestLeaveState("game");66 67 // TODO: Remove and destroy console command68 69 this->unloadLevel();70 71 54 GSLevel::leave(); 72 55
Note: See TracChangeset
for help on using the changeset viewer.