September 2018
Intermediate to advanced
434 pages
8h 47m
English
Coins are more fun if there are two value variations. We will create two coins:
The two coins will be distinguishable by their color, as seen here:

We only need a single Coin class to create both denominations. Everything in the Coin class should look very familiar at this point. To create the Coin class, add a new file named Coin.swift and then enter the following code:
import SpriteKit class Coin: SKSpriteNode, GameSprite { var initialSize = CGSize(width: 26, height: 26) var textureAtlas: SKTextureAtlas = SKTextureAtlas(named: "Environment") var value ...Read now
Unlock full access