I’m looking to restart the same scene whenever the player dies. There is a big going on at start up so if possible I’d rather not try and manually reset all the game variables.
In the part that the player dies I do the following
cocos2d::CCScene **pScene = GameScene::scene;
But this leads to the following crash:
m_pTextures = new CCDictionary;
Gamescene is inherits from CCLayer and its constructor looks like this.
CCScene scene = CCScene::create;
GameScenelayer = GameScene::create;
The app crashes on this line GameScene**layer = GameScene::create(); but I can’t really follow it any further. Am I doing anything wrong in the replacing of the scene?
Thanks for any help