I have got a class IntroMenu defined like this:
class IntroMenu : public cocos2d::CCLayerColor
CCScene *scene = CCScene::node();
IntroMenu *layer = IntroMenu::node();
When I instanciate IntroMenu from my AppDelegate, I proceed like this in AppDelegate:
introScene = IntroMenu::scene();
((IntroMenu*)introScene)->_app = this;
app is a public variable of IntroMenu.
The problem is thatapp is a null pointer when I want to use it later in other methods of AppDelegate.
How to instanciate properly IntroMenu and its variable _app ?