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