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.
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 kit of this chapter.