© James Goodwill and Wesley Matlock 2017

James Goodwill and Wesley Matlock, Beginning Swift Games Development for iOS, 10.1007/978-1-4842-2310-9_5

5. Adding Actions and Animations

James Goodwill and Wesley Matlock2

(1)Highlands Ranch, Colorado, USA

(2)Kansas City, Missouri, USA

In this chapter, you will refactor the orb node’s layout one last time with the goal of enhancing playability. After that, we’ll show you how you can use SKActions to move an SKSpriteNode back and forth across the scene and then make that same node rotate forever. We close out the chapter with a look at how you can add colorizing effects to an SKSpriteNode using a colorize action.

Refactoring the Orb Node Layout One Last Time

Before we start talking about SKActions, a few changes ...

Get Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.