How to enable multi touch in cocos2d?
Could anyone show me how开发者_Python百科 to enable multi touch in cocos2d application please? I am new to this. Really appreciate any help.
Use setMultipleTouchEnabled:Yes for your UIWindow or UIView, and then set the isTouchEnabled property for the layer on which you want to receive touches.
I tested on Cocos2D 1.0rc2, and in that version you must put the setMultipleTouchEnabled command in the OpenGL view (in the appdelegate class):
[glView setMultipleTouchEnabled:YES];
and in your CCLayer init function:
self.isTouchEnabled = YES;
精彩评论