我正在制作游戏,但在旋转精灵节点时遇到了麻烦,这是我拥有的代码;我必须添加什么来转动它,比如说 45 度?
SKSpriteNode *platform = [SKSpriteNode spriteNodeWithImageNamed:@"YellowPlatform.png"];
platform.position = CGPointMake(CGRectGetMidX(self.frame), -200+CGRectGetMidY(self.frame));
platform.size = CGSizeMake(180, 10);
platform.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:platform.size];
platform.physicsBody.dynamic = NO;
[self addChild:platform];