Game Development Reference
In-Depth Information
Using ParticleEmitter - Soaring Birds
Particle Emitters, in general, are good in order to create an atmosphere in the games. The
most common case is probably for smoke or fire and explosions. Particles can, however, be
used for many interesting things. In this recipe, we're going to explore that by tuning a
ParticleEmitter to create birds sailing through the sky.
The particles are still sprites, 2D images, so they will work best either far up in the sky, or
below us.
The recipe will be divided into two parts. The first one contains setting up the
ParticleEmitter
class in the SDK and writing the
ParticleInfluencer
inter-
face. The second part includes changing the way the
ParticleEmitter
class behaves
and extending our
ParticleInfluencer
interface to take advantage of this: