为了弄清楚选择了哪个级别,我想将选择的按钮信息共享给替换的场景。我该怎么做?
CCLabelBMFont *label = [CCLabelBMFont labelWithString:@"Lavel_2" fntFile:@"font.fnt"];
CCMenuItemLabel *titem = [CCMenuItemLabel itemWithLabel:label target:self selector:@selector(sceneLoader:)];
CCMenu *menu = [CCMenu menuWithItems: titem, nil];
menu.position = ccp(screenSize.width/2, screenSize.height/2);
[self addChild:menu];
- (void)sceneLoader:(id)sender {
[[CCDirector sharedDirector] replaceScene: [GameLayer scene]];
}