开发者

How to pass data in Android cocos2d menuItem selector?

In Iphone i am able to pass selector id like this way

CCMenuItemSprite* item =[CCMenuItemSprite itemFromNormalSprite:normalSprite 
selectedSprite:selectedSprite target:tar开发者_高级运维get selector:@selector(LaunchLevel:)];

and the selected menuItem tag is obtained by

- (void ) LaunchLevel: (id) sender
{
    // Do Something

    CCMenuItemSprite *temp = (CCMenuItemSprite *)sender;
}

My question is how to do the similar code in android? Means how to pass the id of the MenuItem


You cannot do this for the moment. If you check the code source there is nothing for this purpose. But as cocos2d is open source, nothing prevents you to implement this feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜