我知道您曾经可以通过以下方式完成:
<CCLayerObject>.isTouchEnabled = YES;
与触摸调度程序的注册配合使用:
-(void)registerWithTouchDispatcher
{
[[[CCDirector sharedDirector] touchDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
}
然后只需获取回调即可:
-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint point = [self convertTouchToNodeSpace:touch];
NSLog(@"X:%ftY:%f", point.x, point.y);
}
但在V3中你需要做什么呢?