Get runninScene inside appDelegate.cpp

Hi,
I want to know if it’s possible to get the runningScene inside AppDelegate.cpp.
I have 3 scenes, HelloWorldScene, GameScene, OptionsScene.

I want to make a specific thing only when the game is resumed and the GameScene is running.
I know there’s a method called getRunningScene(), but I don’t know how to use it.

Thanks.

  1. At first set a tag for each scene. e.g

@ CCScene *scene = CCScene::create();
scene->setTag(GAME_SCENE_TAG);@

  1. Then using the tag check whether the running scene is the desired scene or not .

cocos2d::CCDirector::sharedDirector()->getRunningScene()->getTag()==GAME_SCENE_TAG

I don’t know that is necessary to setTag to make possible recover Scenes.

Thanks for the help.