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