In issue 652, a project member said:
Layer need to implement both methods: ccTouches and ccTouch.
The default one is ccTouches but you can modify the default behavior by overriding
the "registerWithTouchDispatcher".
具体做法就是在CCLayer子类中增加如下代码:
-(void) registerWithTouchDispatcher { [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; }
浙公网安备 33010602011771号