What seems to be happening is that when I swipe, both the jump method and the setting of firstSwipe to true is called:
Code:
-(void) characterJump {
int setter = jumpCounter;
if(jumpCounter < 2)
{
setter += 1;
ySpeed -= kJumpStrength;
firstSwipe = true;
}
jumpCounter = setter;
}
As both methods move the character, however, what I think that the downward velocity is applied before the upward velocity of the jump. Is there a piece of delay code or something that I can use to delay the firstSwipe = true until the jump has finished?
Thanks
Cam