Game Development Reference
For the customized particle effect in the ParticleEffects01 project, I've created the
ParticleEffectSelfMade class. The interface of this class is in Listing 9-2 .
#import < Foundation/Foundation.h>
@interface ParticleEffectSelfMade : CCParticleSystemQuad
Now you'll look at the implementation of the self-made particle effect, which uses all
the available properties. I'll attempt to explain each of them, but it's much better to see
it for yourself and experiment with the parameters, so I encourage you to tweak the
properties in this project. In the ParticleEffects01 project ( Listing 9-3 ), you'll
also find comments describing each parameter in brief.
return [self initWithTotalParticles:250];
self = [super initWithTotalParticles:numParticles];
self.duration = kCCParticleDurationInfinity;
self.emitterMode = kCCParticleModeGravity;
// some properties must only be used with a specific emitterMode!
if (self.emitterMode == kCCParticleModeGravity)