开发者

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;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜