c++ - 在 cocos2d-x 中暂停特定场景

标签 c++ xcode cocos2d-x

我正在使用 cocos2d-x 开发游戏。我想在用户按下暂停按钮时暂停特定场景。

谢谢。

最佳答案

您可以通过两种不同的方式暂停特定场景

1.) 使用 CCDirector::sharedDirector()->stopAnimation(); 暂停并使用 CCDirector::sharedDirector()->startAnimation(); 恢复.

2.) 使用CCDirector::sharedDirector()->pause(); 暂停和 CCDirector::sharedDirector()->resume(); 恢复。

关于c++ - 在 cocos2d-x 中暂停特定场景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24606829/

相关文章:

c++ - cocos2d-x CCControlSlider 不滑动

c++ - 无法访问属性 C++

c++ - C++ 中的协变返回类型到底是什么?

c++ - 异常 - VC++2015 CTP Ultimate 中的不正确行为

c++ - Boost::Spirit:基本 "logical and"表达式解析

iphone - 应用内购买在 monotouch ios 中崩溃

iphone - 维护 UISegmentedControl 中的选择

C++ CLR 在 Visual Studio 中使用 Zlib 的 Minizip

iOS 8 iPad 唯一的错误与操作表

cocos2d-x - 如何拉伸(stretch) Cocos2d-x 3.0 按钮以适应它们的文本内容?