Tutorial by Examples

In SpriteKit a Sprite is represented by the SKSpriteNode class (which inherits from SKNode). First of all create a new Xcode Project based on the SpriteKit template as described in Your First SpriteKit Game. Creating a Sprite Now you can create a SKSpriteNode using an image loaded into the Assets...
You can subclass SKSpriteNode and define your own type of sprite. class Hero: SKSpriteNode { //Use a convenience init when you want to hard code values convenience init() { let texture = SKTexture(imageNamed: "Hero") self.init(texture: texture, color: .clearCol...

Page 1 of 1