O'Reilly logo

iOS Game Programming Cookbook by Bhanu Birani, Chhavi Vaishnav

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Particle emitter integration

Now we are ready and equipped for the particle system to be added to our game FlyingSpaceship. In this section, we will take the FireParticle and SmokeParticle files, create a SKEmitterNode object for the respective file and add it to the respective entity on some event.

After all this, a thrust for the spaceship will be visible in the game making our character more empowered. Also, a collision smoke effect will be seen when a coin is picked by the spaceship.

Getting ready

We will start by adding emitters in the games. We should also go through the documentation of the SKEmitterNode class provided in the preceding sections. And then we can continue adding the code for the addition of the spaceship's thrust in the starter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required