I have designed a game that the main character will jump in the screen for gaining points, but i need the player can only touch after the character landed, i had done following thing but still no work, what have i missed??
(BOOL)ccTouchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {
UITouch *touch = [touches anyObject];
CGPoint point = [touch locationInView: [touch view]];
point = [[Director sharedDirector] convertCoordinate: point];
id jump = [JumpTo actionWithDuration:0.5 position:ccp(point.x,point.y) height:100 jumps:1];
[plainSprite runAction:jump];
if (![jump isDone])
{
isTouchEnabled=NO;
}
return YES;
}