Discussion in 'iOS Programming' started by srinivas.be88, Sep 6, 2010.

  1. srinivas.be88 macrumors newbie

    Aug 10, 2010
    hi ,
    i created a menu and that contains "startgame","settings","about" and "exit". when i touch the startgame it loads a play screeen . i added a pause button on playscreen. when i touch a pause button game will show the menu screen.. menu and playscreen created in two scene.when i call the pause method that pause the all scene.
    when i touch the pause button i called the pause method that contains
    [[CCDirector shareddirector] pause];

    but i need to display the menu screen again. how to implement this one.
    the CCDirector pause the whole game.but i need to pause the playscreen only and call the another scene
  2. bweberapps macrumors member

    Jun 25, 2010
    In my game I didn't switch scenes at all when they hit the pause button. I paused the director and stopped animation, then unscheduled all running schedulers (so the score doesn't keep going up while it's paused). Then I recreated my CCMenu and background on top of everything in my game scene. This way it gives the illusion that the scene changed, or in my case the pause menu was overlaid on the game scene, but really it's just a menu drawn on top of the game scene. Then if they click resume I unpause the director, start animation, and reschedule all schedulers. It has worked out pretty well so far.
  3. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State

Share This Page