C++ 在cocos2d-x中暂停特定场景
我正在用cocos2d-x开发一个游戏。我想在用户按下暂停按钮时暂停特定场景C++ 在cocos2d-x中暂停特定场景,c++,xcode,cocos2d-x,C++,Xcode,Cocos2d X,我正在用cocos2d-x开发一个游戏。我想在用户按下暂停按钮时暂停特定场景 谢谢。您可以用两种不同的方式暂停特定场景 1.)使用CCDirector::sharedDirector()->stopAnimation()暂停并CCDirector::sharedDirector()->startAnimation()以继续 2.)使用CCDirector::sharedDirector()->pause()暂停并重新启动 CCDirector::sharedDirector()->resume(
谢谢。您可以用两种不同的方式暂停特定场景 1.)使用
CCDirector::sharedDirector()->stopAnimation()代码>暂停并CCDirector::sharedDirector()->startAnimation()代码>以继续
2.)使用CCDirector::sharedDirector()->pause()代码>暂停并重新启动
CCDirector::sharedDirector()->resume()代码>继续。您可以用两种不同的方式暂停特定场景
1.)使用CCDirector::sharedDirector()->stopAnimation()代码>暂停并CCDirector::sharedDirector()->startAnimation()代码>以继续
2.)使用CCDirector::sharedDirector()->pause()代码>暂停并重新启动
CCDirector::sharedDirector()->resume()代码>继续。您可以用两种不同的方式暂停特定场景
1.)使用CCDirector::sharedDirector()->stopAnimation()代码>暂停并CCDirector::sharedDirector()->startAnimation()代码>以继续
2.)使用CCDirector::sharedDirector()->pause()代码>暂停并重新启动
CCDirector::sharedDirector()->resume()代码>继续。您可以用两种不同的方式暂停特定场景
1.)使用CCDirector::sharedDirector()->stopAnimation()代码>暂停并CCDirector::sharedDirector()->startAnimation()代码>以继续
2.)使用CCDirector::sharedDirector()->pause()代码>暂停并重新启动
CCDirector::sharedDirector()->resume()代码>继续。背景音乐未播放。当我按“菜单”键时,它将暂停,我重新启动,背景音乐未播放。我在appdelegate.cpp CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic()中使用以下代码;CocosDenshion::SimpleAudioEngine::sharedEngine()->ResumeBackgroundMusic();在这里,我也尝试了同样的方法,但对我来说效果很好。。。在简历中,请添加以下代码CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(10);并在ApplicationIdentiterForeGround中尝试我需要使用的位置。测试恢复背景音乐的方法的音量背景音乐未播放。当我按MenuClick键时,它将暂停,然后我重新启动,背景音乐未播放。我在appdelegate.cpp CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic()中使用以下代码;CocosDenshion::SimpleAudioEngine::sharedEngine()->ResumeBackgroundMusic();在这里,我也尝试了同样的方法,但对我来说效果很好。。。在简历中,请添加以下代码CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(10);并在ApplicationIdentiterForeGround中尝试我需要使用的位置。测试恢复背景音乐的方法的音量背景音乐未播放。当我按MenuClick键时,它将暂停,然后我重新启动,背景音乐未播放。我在appdelegate.cpp CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic()中使用以下代码;CocosDenshion::SimpleAudioEngine::sharedEngine()->ResumeBackgroundMusic();在这里,我也尝试了同样的方法,但对我来说效果很好。。。在简历中,请添加以下代码CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(10);并在ApplicationIdentiterForeGround中尝试我需要使用的位置。测试恢复背景音乐的方法的音量背景音乐未播放。当我按MenuClick键时,它将暂停,然后我重新启动,背景音乐未播放。我在appdelegate.cpp CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic()中使用以下代码;CocosDenshion::SimpleAudioEngine::sharedEngine()->ResumeBackgroundMusic();在这里,我也尝试了同样的方法,但对我来说效果很好。。。在简历中,请添加以下代码CocosDenshion::SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(10);并尝试在ApplicationIdentiterForeground中我需要使用的位置。测试恢复背景音乐的方法的音量