Game Development Reference
In-Depth Information
Figure 6-5
.
The SpriteKit particle emitter properties
Each of the properties in this particle emitter editor changes the way each of the particles
is emitted. Once you have modified each of the emitter properties you are interested in,
Xcode will save the emitter properties in a Sprite Kit particle file with the
.sks
exten-
sion. The resulting file contains an archived
SKEmitterNode
object configured to run
the particle effects designed in the editor. When you want to use the particle emitter in
your game, you first get the path to the
.sks
file from
mainBundle
; then you use this
path to unarchive the
SKEmitterNode
object and add the node to the scene or another
SKNode
.
let pathToEmitter =