2011-04-17 11 views
0

は、同時にジャンプして動く...ヘルプ!タイトルが言うように、私はジャンプと同時に動くとこだわっている

これは私が試してみたいと行う

-(void)collisionCheckingAndMovementRight:(ccTime)dt{ 

CGPoint tileCoord = [self tileCoordForPosition:player.position]; 
int tileGid = [csLayer tileGIDAt:tileCoord]; //csLayer is the layer which was created in tiled for the collision 
if (tileGid) { 
    NSDictionary *properties = [levelOne propertiesForGID:tileGid]; 
    if (properties) { 

     NSString *collision = [properties valueForKey:@"Collidable"]; 
     if (collision && [collision compare:@"True"] == NSOrderedSame){ 

      //[[SimpleAudioEngine sharedEngine] playEffect:@"hit.caf"]; 
      return; 

     } 

    } 

} 

player.position = ccp(player.position.x +100*dt, player.position.y); 

軸の「x」に沿って移動しています方法です私は今x軸の動きがあるジャンプ... ....助けが大いにありがたいです

答えて

0

あなたはcocos2dのアクションの例を見たいと思います。 CCBezierToアクションは、ジャンプをアニメーション化する良い方法を考えています。

関連する問題