- Timestamp:
- Dec 4, 2008, 8:28:14 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/gamestates/GSRoot.cc
r2171 r2344 40 40 #include "core/TclBind.h" 41 41 #include "core/TclThreadManager.h" 42 #include "core/LuaBind.h" 42 43 #include "tools/Timer.h" 43 44 #include "objects/Tickable.h" … … 87 88 // creates the class hierarchy for all classes with factories 88 89 Factory::createClassHierarchy(); 90 91 // Create the lua interface 92 this->luaBind_ = new LuaBind(); 89 93 90 94 // instantiate Settings class … … 117 121 FunctorMember<GSRoot>* functor1 = createFunctor(&GSRoot::exitGame); 118 122 functor1->setObject(this); 119 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor1, "exit")); 123 ccExit_ = createConsoleCommand(functor1, "exit"); 124 CommandExecutor::addConsoleCommandShortcut(ccExit_); 120 125 121 126 // add console commands 122 127 FunctorMember01<GameStateBase, const std::string&>* functor2 = createFunctor(&GameStateBase::requestState); 123 128 functor2->setObject(this); 124 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(functor2, "selectGameState")); 129 ccSelectGameState_ = createConsoleCommand(functor2, "selectGameState"); 130 CommandExecutor::addConsoleCommandShortcut(ccSelectGameState_); 125 131 } 126 132 127 133 void GSRoot::leave() 128 134 { 129 // TODO: remove and destroy console commands 135 // destroy console commands 136 delete this->ccExit_; 137 delete this->ccSelectGameState_; 130 138 131 139 delete this->shell_; … … 133 141 delete this->tclBind_; 134 142 135 delete settings_;136 143 delete this->settings_; 144 delete this->luaBind_; 137 145 } 138 146
Note: See TracChangeset
for help on using the changeset viewer.