Game Development Reference
In-Depth Information
Figure 6-12
.
The final particle emitter
This is exactly what was needed. The fire is being emitted in the correct direction, and the
size and Birthrate values will fit nicely attached to the
playerNode
.
Let's start using the new emitter. If you remember from the previous sections, once you
have the emitter looking like you want it to, it is really easy to add to your scene. The first
thing you need to do is load the
SKEmitterNode
using your new SKS file. This is
pretty simple and can be accomplished by first adding a constant to hold the new
SKEmitterNode
instance. To do this, add the
engineExhaust
constant immediately
before the first
init()
method in the
GameScene
.
let engineExhaust : SKEmitterNode?