Reputation: 503
How do I create an empty SKSpriteNode
in Swift? I need a SKSpriteNode
which I can add SKSpriteNode
children to.
The equivalent of this in Objective-C:
SKSpriteNode *textSprite = [SKSpriteNode new];
Upvotes: 1
Views: 2069
Reputation: 14261
Let type inference do the work of figuring out the type:
var textSprite = SKSpriteNode()
Upvotes: 2