How to enable multi touch in cocos2d?

后端 未结 2 1395
情书的邮戳
情书的邮戳 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条回答
  •  北荒
    北荒 (楼主)
    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;
    

提交回复
热议问题