我正在使用启用了cocos2d多点触控的场景,我无法正确检测到触摸。当按下一次触摸并快速敲击其他触摸时,轻敲的触摸在第一次触摸后停止给出输出。类似地,如果放下并保持另一触摸并且释放初始保持触摸,则不记录该改变。一旦所有保持的触摸被释放,轻敲的触摸全部通过大约0.001秒的分离。下面是触摸输出的日志,注释了我当时正在做的事情(我正在给予的输入)。
2014-05-27 08:57:31.486 Rotation a1[233:60b] Touch detected. //Tapped left side
2014-05-27 08:57:32.066 Rotation a1[233:60b] Touch detected. //Tapped right side
2014-05-27 08:57:32.535 Rotation a1[233:60b] Touch detected. //Left
2014-05-27 08:57:33.002 Rotation a1[233:60b] Touch detected. //Right
2014-05-27 08:57:35.835 Rotation a1[233:60b] Touch detected. //Held touch on right
2014-05-27 08:57:38.587 Rotation a1[233:60b] Touch detected. //Tapped center while continuing to hold right touch.
2014-05-27 08:57:40.821 Rotation a1[233:60b] Gesture: Failed to receive system gesture state notification before next touch //Not sure what caused this to trigger. Was just tapping and holding at this point. This error does not happen consistently.
//Continued tapping around the screen. No output occurred.
2014-05-27 08:57:48.986 Rotation a1[233:60b] Touch detected. //Let go of held touch. Everything flooded through at once.
2014-05-27 08:57:48.987 Rotation a1[233:60b] Touch detected.
2014-05-27 08:57:48.989 Rotation a1[233:60b] Touch detected.
2014-05-27 08:57:48.991 Rotation a1[233:60b] Touch detected.
2014-05-27 08:57:48.992 Rotation a1[233:60b] Touch detected.
[...]
2014-05-27 08:57:49.005 Rotation a1[233:60b] Touch detected. //Final touch came through
我对此感到很困惑。我还在下面提到了我的触摸检测方法。这只是一个日志,所以我不认为它涉及到这个问题。
-(void) touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
CCLOG(@"Touch detected.");
}
我错过了什么?