正如标题所说,我一直在跳跃和移动,
这就是我沿'x'轴移动的方式
-(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轴运动相关的跳跃....非常感谢帮助
答案 0 :(得分:0)
您想查看cocos2d中的操作示例。 CCBezierTo动作浮现在脑海中,想要一种动画跳跃的好方法。