April 2021
Beginner to intermediate
506 pages
11h 57m
English
Using a single action in SpriteKit is powerful, but even more powerful are actions that you chain together. When you chain actions together, you can create a complex system of actions that you can run either as a group or a sequence. You can also set up your actions to repeat forever or for a set number of times, as you saw earlier in Animate the Player with Actions.
To make the collectible drops fall from the sky, you’ll use several actions chained together, creating a single sequence of actions. You’ll build this sequence of actions in a new drop(dropSpeed:floorLevel) method.
Open the Collectible.swift file. Below the initialization methods, add the following code:
| | // MARK: - FUNCTIONS |
| | func ... |
Read now
Unlock full access