KDvoid GameManager::showMenu ( KDvoid )
{
	m_eGameState = MainMenu;
	CCDirector::sharedDirector ( )->popScene ( );

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