void MenuState::enter() { //if ( loading->getParent() == sheet) sheet->removeChildWindow( loading); //sheet->invalidate( true); OgreFramework::getSingletonPtr()->m_pLog->logMessage("Entering MenuState..."); m_pSceneMgr = OgreFramework::getSingletonPtr()->m_pRoot->createSceneManager(ST_GENERIC, "MenuSceneMgr"); m_pSceneMgr->setAmbientLight(Ogre::ColourValue(0.7f, 0.7f, 0.7f)); OgreOggSound::OgreOggSoundManager::getSingletonPtr()->setSceneManager( m_pSceneMgr); OgreOggSound::OgreOggISound* mainLoop = OgreOggSound::OgreOggSoundManager::getSingletonPtr()->createSound( "MenuLoop", "Sanctuary.ogg", true, true); mainLoop->disable3D( true); mainLoop->setVolume( 1.0); mainLoop->play(); m_pCamera = m_pSceneMgr->createCamera("MenuCam"); m_pCamera->setPosition(Vector3(0, 25, -50)); m_pCamera->lookAt(Vector3(0, 0, 0)); m_pCamera->setNearClipDistance(1); m_pCamera->setAspectRatio(Real(OgreFramework::getSingletonPtr()->m_pViewport->getActualWidth()) / Real(OgreFramework::getSingletonPtr()->m_pViewport->getActualHeight())); OgreFramework::getSingletonPtr()->m_pViewport->setCamera(m_pCamera); createScene(); CEGUI::System::getSingleton().setGUISheet(sheet); CEGUI::System::getSingleton().signalRedraw(); }
void AudioManager::playGunshot() { OgreOggSound::OgreOggISound* gunShot = mSoundMgr->createSound("gunShot" + std::to_string(static_cast<long long>(gunShots)), "laser.ogg", false, false, false, NULL, true); gunShot->markTemporary(); gunShot->disable3D(true); gunShot->setVolume(0.3); gunShots++; gunShot->play(true); }
void AudioManager::playMain() { OgreOggSound::OgreOggISound* mainSong = mSoundMgr->createSound("background", "DST-TacticalSpace.ogg", true, true, false); mainSong->disable3D(true); mainSong->play(); }