我試圖將背景全部放置在場景背景中,但由於某種原因它將它放在屏幕之外。添加SpriteKit背景場景
這是我用什麼:
SKTexture *backgroundTexture = [self.atlas textureNamed:@"back"];
SKSpriteNode *background = [SKSpriteNode spriteNodeWithTexture:backgroundTexture size:self.view.frame.size];
background.position = (CGPoint) {CGRectGetMidX(self.view.frame), CGRectGetMidY(self.view.frame)};
[self addChild:background];
這是怎麼所言: