Chapter    7

Adding Points and Sound

In the previous chapter, I briefly introduced you to particle emitters, including a quick look at some of Xcode’s template emitters. After that, I showed you how to add a particle emitter to the playerNode so that you could emulate engine exhaust whenever an impulse is applied to the physicsBody.

In this chapter, I will talk about using SKLabelNodes to add labels to your Sprite Kit games. Specifically, I will show you how to add a label that keeps up with the number of impulses remaining for the SuperSpaceMan to use, and then I will show you how to add scoring to the game to keep up with the number of orbs the SuperSpaceMan has collected.

At the end of the chapter, you will get a chance to revisit SKAction ...

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.