Game Development Reference
In-Depth Information
How to do it
Let's start with the files related to the particle system created and change its property val-
ues. There are two files created when building a particle system:
• An sks file, which is the particle file, is used to create an SKEmitterNode object
to be added on any node or scene.
• A default file called spark.png is imported, which is used to specify a particle
image in the particle editor for a particular sks file. It can be any image imported
externally.
Since the whole process of creating a particle file is clear, we will go further with tweaking
some of the properties of the FireParticle file to make a thrust of the spaceship.
1. First of all, as the spaceship is headed towards the right side of the screen, we have
to make a thrust coming from right to left. In the FireParticle file, the default
value of the angle is around 89 degrees; change this to 180 to make it look right to
left.
2. As you can see in the preceding snapshot, the particles are more and the birth rate
is very high compared to the spaceship. So we need to reduce the particles to 50
and the birth rate to 0.5 giving a smaller particle system with less lifetime, as
shown in the following snapshot:
Search WWH ::




Custom Search