Changeset 5876 for code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc
- Timestamp:
- Oct 4, 2009, 11:08:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc
r5863 r5876 31 31 #include <OgreSceneManager.h> 32 32 33 #include "util/Clock.h"34 33 #include "core/input/InputManager.h" 35 34 #include "core/input/InputState.h" … … 57 56 58 57 // create an empty Scene 59 this->scene_ = new Scene( 0);58 this->scene_ = new Scene(NULL); 60 59 // and a Camera 61 60 this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera"); 61 // Load sound 62 this->ambient_ = new SoundMainMenu(); 62 63 } 63 64 … … 77 78 GraphicsManager::getInstance().setCamera(this->camera_); 78 79 79 this->ccStartStandalone_ = createConsoleCommand(createFunctor(&GSMainMenu::startStandalone, this), "startGame"); 80 CommandExecutor::addConsoleCommandShortcut(this->ccStartStandalone_); 81 this->ccStartServer_ = createConsoleCommand(createFunctor(&GSMainMenu::startServer, this), "startServer"); 82 CommandExecutor::addConsoleCommandShortcut(this->ccStartServer_); 83 this->ccStartClient_ = createConsoleCommand(createFunctor(&GSMainMenu::startClient, this), "startClient"); 84 CommandExecutor::addConsoleCommandShortcut(this->ccStartClient_); 85 this->ccStartDedicated_ = createConsoleCommand(createFunctor(&GSMainMenu::startDedicated, this), "startDedicated"); 86 CommandExecutor::addConsoleCommandShortcut(this->ccStartDedicated_); 87 this->ccStartMainMenu_ = createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu, this), "startMainMenu"); 88 CommandExecutor::addConsoleCommandShortcut(this->ccStartMainMenu_); 80 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone, this), "startGame")); 81 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startServer, this), "startServer")); 82 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startClient, this), "startClient")); 83 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startDedicated, this), "startDedicated")); 84 CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu, this), "startMainMenu")); 89 85 90 86 KeyBinderManager::getInstance().setToDefault(); 91 87 InputManager::getInstance().enterState("mainMenu"); 92 88 93 this->ambient_ = new SoundMainMenu();94 89 this->ambient_->play(true); 95 90 } … … 97 92 void GSMainMenu::deactivate() 98 93 { 99 this->ambient_-> destroy();94 this->ambient_->stop(); 100 95 101 96 InputManager::getInstance().leaveState("mainMenu"); … … 103 98 GUIManager::getInstance().setCamera(0); 104 99 GraphicsManager::getInstance().setCamera(0); 105 106 /*107 if (this->ccStartGame_)108 {109 delete this->ccStartGame_;110 this->ccStartGame_ = 0;111 }112 */113 100 } 114 101
Note: See TracChangeset
for help on using the changeset viewer.