我有一个游戏,当发生两次轻击时玩家跳跃。 问题是我不能禁用用两根手指敲击的功能,你可以用两根手指双击来双击。
-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
//if you tap twice && you stay on ground SO...
if (touch.tapCount == 2 && footContacts > 0)
{
[player jump];
}
tapBegan = TRUE;
return tapBegan;
}