How to enable multi touch in cocos2d?

后端 未结 2 1382
情书的邮戳
情书的邮戳 2021-02-19 09:24

Could anyone show me how to enable multi touch in cocos2d application please? I am new to this. Really appreciate any help.

相关标签:
2条回答
  • Use setMultipleTouchEnabled:Yes for your UIWindow or UIView, and then set the isTouchEnabled property for the layer on which you want to receive touches.

    0 讨论(0)
  • 2021-02-19 10:16

    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 讨论(0)
提交回复
热议问题