Exemplo n.º 1
0
KDvoid GameManager::showMenu ( KDvoid )
{
	m_eGameState = MainMenu;
	CCDirector::sharedDirector ( )->popScene ( );

	SimpleAudioEngine*		pSE = SimpleAudioEngine::sharedEngine ( );
	if ( !pSE->isBackgroundMusicPlaying ( ) && m_bMusicOn )
	{
		pSE->preloadBackgroundMusic ( "titletheme.mp3" );
	}
}
Exemplo n.º 2
0
void MainScene::PlayStopBGM()
{
	SimpleAudioEngine* audio = SimpleAudioEngine::getInstance();
	if (audio->isBackgroundMusicPlaying())
	{
		audio->stopBackgroundMusic();
	}
	else
	{
		audio->playBackgroundMusic("musics/bgm.mp3");
	}
}