我设计了一个游戏,主角会跳入屏幕获得积分,但我需要玩家在角色落地后才能触摸,我做了以下事情但仍然没有工作,我错过了什么??
(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;
}
返回是;
}