September 2018
Intermediate to advanced
434 pages
8h 47m
English
The Blade class will keep Pierre from flying too low. This enemy class will be similar to the others we have created, with one exception: we will generate a physics body based on the texture. The physics body circles that we have been using are very fast computationally and are usually sufficient to describe the shapes of our enemies; the Blade class requires a more complicated physics body, given its half-circle shape and bumpy edges:

To add the Blade class, create a new file named Blade.swift and add the following code:
import SpriteKit class Blade: SKSpriteNode, GameSprite { var initialSize ...Read now
Unlock full access