当我尝试在我的SKSpritenode上设置中心时,它会显示错误。我可以使用位置,但这不是完成我想要的正确方法。关于使用什么的任何想法?或者如何在节点上使用.center?
player.center = CGPointMake(player.center.x, player.center.y - BirdFly); // Shows error that i put in title
BirdFly = BirdFly - 5;
if (BirdFly < -15){
BirdFly = -15;
}
if (BirdFly > 0){
player.texture = [SKTexture textureWithImageNamed:@"flappy1"];
}
if (BirdFly < 0){
player.texture = [SKTexture textureWithImageNamed:@"flappy5"];
}
}