I'm trying to include a pause feature for my game. So far running pause
on the [CCDirector sharedDirector]
has been good enough when run through my pauseGame
method (which incorporates a BOOL to tell if game is paused, etc.)
However, I noticed that if I go back to the homescreen on my device, my application delegate will automatically run pause
and resume
on the sharedDirector
.
Ideally, I would like access my active scene/layer's so I can run my own pause method.
How can I: 1) check if the current scene is my game scene 2) access the game scene's pause property, and run the pauseGame method on it?
Any help appreciated. Thanks