Hello,
I am a newbie at cocos2d and I am making a basic game to get the hang of how cocos2d works. I ran into a problem with the MenuItems. I need a way to know what menu item was pressed.
For Example:
CCMenuItem *a = [CCMenuItemFont itemFromString:@"A" target:self selector:@selector(check:)];
CCMenuItem *b = [CCMenuItemFont itemFromString:@"B" target:self selector:@selector(check:)];
CCMenuItem *c = [CCMenuItemFont itemFromString:@"C" target:self selector:@selector(check:)];
I need all the menu items to go through check: but I can't figure out a way to figure out what menu item was pressed. I tried working with the sender for check: but it didn't seen to tell me exactly what button was pressed.
If someone could give me some pointers or maybe a better way of doing this I would greatly appreciate it.