Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/135.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 在cocos2d-x中暂停特定场景_C++_Xcode_Cocos2d X - Fatal编程技术网

C++ 在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(

我正在用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()继续。

背景音乐未播放。当我按“菜单”键时,它将暂停,我重新启动,背景音乐未播放。我在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中我需要使用的位置。测试恢复背景音乐的方法的音量