I'm working on making a "menu" with SKNode being the menu background, and a bunch of SKSpriteNodes as the child element options.
The problem is I can't figure out how to add a color or texture or something to the SKNode to serve as a background to the menu; there are no .size, .texture, .color, or .background/.backgroundcolor method options
should I use an SKSpriteNode with other SKSpriteNodes inside, or should I maybe use an SKScene instead with SKSpriteNodes inside? or is there a way to assign an SKNode a background image or color?
I will create red sprite for example
let sprite = SKSpriteNode(color: UIColor.redColor(), size: CGSizeMake(20, 20))
sprite.position = CGPointMake(self.size.width/2, self.size.height/2)
addChild(sprite)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With