when i changed view in Cocoa Touch i use this:
GameViewController *game = [self.storyboard instantiateViewControllerWithIdentifier:@"GameViewController"];
game.something = someValue;
game.somethingOther = someOtherValue;
[self presentViewController:game animated:NO completion:^{}];
How can i pass this values before replaceScene
?
I've got this now:
[[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[GameLayer scene] withColor:ccWHITE]];
Ok, that was so easy...
Needed to create method +(CSScene *)sceneWithParameter:
and method -(id)initWithParameter:
. And in first method need to change ClassLayer *layer = [ClassLayer node]
on ClassLayer *layer = [[ClassLayer alloc] initWithParameter:]
and it works.