February 2017
Beginner to intermediate
258 pages
5h 31m
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