September 2018
Intermediate to advanced
434 pages
8h 47m
English
Next, let's add our custom sprite to the scene. We will use the same asset that we used to make the regular SpriteKit game. One difference is that this time we will use the bee as one of the enemies. So, add the bat-fly, bat, bee-fly, bee, madfly-fly, and madfly assets to the assets in the Enemies folder:

Also, add the GameSprite.swift, Bee.swift, Bat.swift, and Madfly.swift files and make changes to them as explained in this section.
Here is the GameSprite.swift file:
import SpriteKit
protocol GameSprite {
var textureAtlas: SKTextureAtlas { get set }
var initialSize: CGSize { get set }
}Here is the modified Bee.swift file:
import ...
Read now
Unlock full access