게임용 멀티 터치 코드로 거의 끝났지 만 한 가지 더 문제가 있습니다. 이것은 코코스 2D에서 수행됩니다 btw :)멀티 터치 .. cctouchesended와 함께 도움이 필요합니다.
플레이어는 왼쪽에 dpad가 있고 오른쪽에 버튼이 있습니다. dpads를 누르고 있으면 점프 버튼을 누르고 있으면 뛰게됩니다. 권리와 점프.
나는 모든 행동을 중지 점프 버튼에서 손가락을 들어, 내가 들어 올려 DPAD에 다시는 내 손가락을 아래로 눌러 일단 문제가...
이 cctouchesended
내 코드입니다-(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
////when the user has stopped touching the screen set the variables
////back to false to stop its movement////
//self.myTouch = nil;
for (UITouch *touch in touches)
{
if (moveRight == TRUE) {
[player stopAction:RunForward];
}
if (moveLeft == TRUE) {
[player stopAction:RunBackwards];
}
moveLeft = FALSE;
moveRight = FALSE;
// jump = FALSE;
}
}