开发者

Iphone game development switching between scenes

i have created a pause button on touch the scene is replaced by the pause menu....

and when we resume the scene comes back开发者_如何学C...however the function keep calling themselves....

how can i pause every thing in my current file when i switch to another scene...


"on touch", the running scene should call:

[[CCDirector sharedDirector] pushScene: [PauseMenu scene]];

The pause menu's "back to game" button should then call:

[[CCDirector sharedDirector] popScene];

Pushing the pause menu into place, should "pause" the scene that is currently being pushed back and when you pop it back it should continue running.

Documentation: http://www.cocos2d-iphone.org/api-ref/latest-stable/interface_c_c_director.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜