Game Development Reference
need any outside help; you create the example particle effects as if they were simple
CCNode objects. As a matter of fact, they are actually derived from CCNode .
I created a project called ParticleEffects01 that shows all the cocos2d example
particle effects. You can cycle through the examples by quickly tapping the screen, and
you can also drag and move them with your finger. Many particle effects look totally
different as soon as they start moving, as you can see in Figure 9-1 . What seems like
just a huge blob of particles may well work as an engine exhaust effect if the particle
effect is moving.
Figure 9-1 . The same particle effect from top to bottom: motionless, moving slowly, moving fast
There's only one type of effect that can't be moved once started—one-time effects like
the CCParticleExplosion shown in Figure 9-2 . What's special about this effect
is that it emits all its particles at once and stops emitting new particles instantly. All
other particle effects run continuously, always creating new particles while those that
have exceeded their lifetime are removed. The challenge in that situation is to balance
the total number of particles that are on the screen.