Chapter    5

Adding Actions and Animations

In the previous chapter, you started to add some real functionality to your game. You began by making some small restructuring changes to the beginning of the game. After that, you added additional orbNode objects to collide with. After adding the new orbNode objects, you added scrolling to your game scene to make it look like the player was flying through space collecting orbs. Finally, you closed out the chapter using the phone’s accelerometer to move the player along the x-axis.

In this chapter, you will refactor the orb node’s layout one last time with the goal of enhancing playability. After that, I will show you how you can use SKActions to move an SKSpriteNode back and forth across the scene ...

Get Beginning Swift Games Development for iOS 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.