如何将此 cocos2d-iphone 代码移植到 cocos2d-x?
(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSSet *allTouches = [event allTouches];
switch ([allTouches count]) {
case 1:
{
UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
switch([touch tapCount])
{
case 1:
// 单击!
break;
case 2:
//Double tap.
// 双击!
break;
}
break;
}
}