I think you can do this by assigning a value to a class variable ....
The code snippet will look like this:
[[CCDirector sharedDirector] replaceScene:[GameScene scene:data]];
at GameScene.m
@implementation GameScene @synthesize ... + (CCScene *) scene:(Datatype *)data { self.dataReceived = data; CCScene * ..... ....... }
Something like this might help .. I did it in cocos2d-x and it works fine. Sorry for the syntax as I don't have X code .... :)
source share