Changeset 5878 for code/branches/core5/src/orxonox/gamestates
- Timestamp:
- Oct 5, 2009, 1:36:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/gamestates/GSMainMenu.cc
r5876 r5878 59 59 // and a Camera 60 60 this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera"); 61 // Load sound 62 this->ambient_ = new SoundMainMenu(); 61 if (GameMode::playsSound()) 62 { 63 // Load sound 64 this->ambient_ = new SoundMainMenu(); 65 } 63 66 } 64 67 65 68 GSMainMenu::~GSMainMenu() 66 69 { 70 if (GameMode::playsSound()) 71 { 72 this->ambient_->destroy(); 73 } 74 67 75 InputManager::getInstance().destroyState("mainMenu"); 68 76 … … 87 95 InputManager::getInstance().enterState("mainMenu"); 88 96 89 this->ambient_->play(true); 97 if (GameMode::playsSound()) 98 { 99 this->ambient_->play(true); 100 } 90 101 } 91 102 92 103 void GSMainMenu::deactivate() 93 104 { 94 this->ambient_->stop(); 105 if (GameMode::playsSound()) 106 { 107 this->ambient_->stop(); 108 } 95 109 96 110 InputManager::getInstance().leaveState("mainMenu");
Note: See TracChangeset
for help on using the changeset viewer.