I am trying to create a rectangle using swift on a Sprite set, since the rectangle should be used as an object in the scene, I assumed that I need to create a SkSpriteNode and they give it size, but it did not work, here is how I did it:
var barra = SKSpriteNode()
barra.name = "bar"
barra.size = CGSizeMake(300, 100)
barra.color = SKColor.whiteColor()
barra.position = CGPoint(x: 100, y: 100)
self.addChild(barra)
Adding barra to the screen does not change the node count.
Any help would be appreciated!
André source
share