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
精彩评论