I’ve done a world select menu scene which then leads to a level select scene. Both of them using the SlidingMenu.h that has been provided on the forums. I’m using Cocos2d-x 2.0.1 at the moment.
At the moment i’m using something like this.
@ CCMenuItemImage *world1 = CCMenuItemImage::itemWithNormalImage(
The code above takes me to my levels scene happily.
If i try using another callback function that i’ve created like:
virtual void menuEnvironmentSelected(CCObject* pSender, int environmentID);
But it won’t compile. How do I pass an integer between scenes? I want the integer to be based on the item that is selected from the menu which will then choose what background image will be used in the level select scene. Any help would be appreciated.