Changeset 6412 for code/branches/pickup2/src/orxonox/gamestates/GSLevel.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/orxonox/gamestates/GSLevel.cc
r5929 r6412 56 56 , guiKeysOnlyInputState_(0) 57 57 , startFile_(0) 58 , bShowIngameGUI_(false) 58 59 { 59 60 } … … 78 79 guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly"); 79 80 guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr()); 80 81 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSLevel::showIngameGUI, this), "showIngameGUI"));82 81 } 83 82 … … 91 90 // level is loaded: we can start capturing the input 92 91 InputManager::getInstance().enterState("game"); 93 92 94 93 // connect the HumanPlayer to the game 95 94 PlayerManager::getInstance().clientConnected(0); 96 }97 }98 99 void GSLevel::showIngameGUI(bool show)100 {101 if (show)102 {103 GUIManager::getInstance().showGUI("inGameTest");104 GUIManager::getInstance().executeCode("showCursor()");105 InputManager::getInstance().enterState("guiMouseOnly");106 }107 else108 {109 GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");110 GUIManager::getInstance().executeCode("hideCursor()");111 InputManager::getInstance().leaveState("guiMouseOnly");112 95 } 113 96 } … … 117 100 if (GameMode::showsGraphics()) 118 101 { 119 // disconnect the HumanPlayer120 PlayerManager::getInstance().clientDisconnected(0);121 122 102 // unload all compositors (this is only necessary because we don't yet destroy all resources!) 123 103 Ogre::CompositorManager::getSingleton().removeAll(); … … 125 105 InputManager::getInstance().leaveState("game"); 126 106 } 107 108 // disconnect all HumanPlayers 109 PlayerManager::getInstance().disconnectAllClients(); 127 110 128 111 if (GameMode::isMaster()) … … 152 135 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 153 136 this->staticObjects_.insert(*it); 154 137 155 138 // call the loader 156 139 COUT(0) << "Loading level..." << std::endl; … … 171 154 if (find == this->staticObjects_.end()) 172 155 { 173 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ")"<< std::endl;156 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ')' << std::endl; 174 157 } 175 158 }
Note: See TracChangeset
for help on using the changeset viewer.