暂停一个场景并运行另一个场景
在cocos2d-iphone中,是否可以“冻结”您的场景,并运行不同的场景(例如,暂停场景),当您完成该场景时,您可以改回原始场景并恢复正常?我想这是可能的,有人曾经告诉我我可以在CCDirector中堆叠场景或其他东西,但我不太明白需要哪些方法。
Is it possible, in cocos2d-iphone, to "freeze" your scene, and run different scene (say, a pause scene), and when you are done with this scene, you can change back to the original scene and resume it just fine? I guess it is possible, someone once told me I could stack scenes or something in the CCDirector, but I did not quite understand what methods are necessary.
这是您正在寻找的内容< /a>:
请记住,原始场景保留在内存中,因此最好是推送的场景应该是轻量级的、内存方面的。
popScene 过渡无法使用 CCSceneTransition 进行动画处理。 Cocos2D 2.0 应该可以解决这个问题,但计划中的改进尚未实现。
This is what you're looking for:
Keep in mind that the original scene remains in memory, so ideally the pushed scene should be lightweight, memory-wise.
The popScene transition can not be animated with CCSceneTransition. Cocos2D 2.0 is supposed to fix that, but the planned improvement is not yet available.