I’m trying to create a MenuItem that would move to gameplay using a block and not a selector (working on cocos2d for IOS v2.0)
CCMenuItemSprite *nextLevelMI = [CCMenuItemSprite itemWithNormalSprite:playSpr selectedSprite:playSpr2 block:^(id sender)block];
Can anyone give me an example for such use?
10x, Shefy
Here’s an example with CCMenuItemLabel. Apart from the other parameters it’s no different than CCMenuItemSprite usage. I assume you want to see how to use the block.
More examples here, in MainMenuScene and ReturnToMainMenuNode for example.