Game Development Reference
In-Depth Information
self.endSize = kCCParticleStartSizeEqualToEndSize;
self.endSizeVar = 0;
You can use the constant kCCParticleStartSizeEqualToEndSize to ensure
that the particle size does not change during a particle's lifetime.
Particle Direction
You set the direction in which particles are initially emitted with the angle propert,
measured in degrees from 0 to 360. A value of 0 means that particles will be emitted
upward, but this is true only for the gravity emitterMode . In radius emitter-
Mode , the angle property determines where on the startRadius the particles will
be emitted; higher values will move the emission point counterclockwise along the ra-
self.angle = 0;
self.angleVar = 0;
Particle Lifetime
A particle's lifetime determines how many seconds it will take to transition from start
to end, where the particle will simply fade out and disappear. The life property sets
the lifetime of individual particles. Keep in mind that the longer particles live, the more
particles will be onscreen at any given time. If the total number of particles is reached,
no new particles will be spawned until some existing particles have died. = 5.0f;
self.lifeVar = 1.0f;
The emissionRate property directly influences how many particles are created per
second. Together with the totalParticles property, it has a big impact on what
the particle effect looks like.
self.emissionRate = 30;
self.totalParticles = 250;
Search Nedrilad ::

Custom Search