2
두 사람이 동시에 다른 장소에서 화면을 두드리고 각 작업마다 다른 작업으로 계산되는 cocos2d의 게임을 작업 중입니까?Cocos2d에서 탭 처리
이것은 두 개의 탭이 동시에 계산하는 것을 허용하지 않습니다 내 현재 코드 :
:-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *myTouch = [touches anyObject];
CGPoint point = [myTouch locationInView:[myTouch view]];
point = [[CCDirector sharedDirector] convertToGL:point];
if (point.y > 512) {
score += 1;
[scoreLabel setString:[NSString stringWithFormat:@"%i", score]];
}
if (point.y < 512) {
score2 += 1;
[scoreLabel2 setString:[NSString stringWithFormat:@"%i", score2]];
}
내가 바로 setFPS 액션에서 내 AppDelegate에에 멀티 터치를 추가 : '[glView setMultipleTouchEnabled : YES];' – mattblessed
요는 여러 터치를 추가하기 때문에이이 문제를 해결 건가요? – akuritsu
예, appdelegate의 코드가이 문제를 해결했습니다. – mattblessed