Game Development Reference
In-Depth Information
Dst Alpha for dst create a very subtle blending effect that is well suited to enhancing a
scene's lighting as particles move about.
The reset on visibility toggle check box, if enabled, means that the particle emitter will re-
move all existing particles when its visible state is changed by code. If the box is un-
checked, the emitter will keep spawning but not render particles while its visible state is
set to NO .
Tip You can create a particle emitter, uncheck the reset on visibility toggle
check box, and keep the particle emitter running for a few seconds to allow it to
spawn some of the initial particles. You can then use a fade action or play a
Timeline that changes the opacity of the emitter node from 0 to 1, fading it into
view. This is commonly needed where the particle emitter should not be seen
building up its particles but instead should start out “fully developed.”
Figure 12-6 shows the mode-specific properties of the CCParticleSystem node. The Grav-
ity mode properties are applied only when the particle emitter is in Gravity mode , and the
Radial mode properties are effective only when the particle emitter is in Radial mode .
Gravity affects each particle. You can use this, for example, to accelerate particles upward
by setting a positive Y value or to create a spring where particles start moving upward but
eventually turn around and fall back down. Gravity is specified in points, and it is simply
added to the particle's position every frame.
Again, this gravity is applied only to that particular Particle System node's particles, and it
has no correlation with the gravity of the CCPhysicsNode .
Speed determines the speed of motion of particles, in points per second. Speed is initially
in the direction given by the Angle property, but it can change over the lifetime of a
particle due to gravity, tangential acceleration, and radial acceleration.
The property labeled Tang. acc refers to tangential acceleration , while Radial acc stands
for radial acceleration . Both contribute to rotational spin for particles.
By increasing the radial acceleration value alone, you'll notice that particles will speed up
and move away from the emitter's position the longer they live. Add tangential accelera-
tion to the mix and particles will spiral outward from the emitter's position. With tangen-
tial acceleration, you can make emitters look like the ones in radial mode except that you
can't prevent the particles from speeding up. Thus, inevitably, they'll be moving away
from the emitter position.
Search WWH ::




Custom Search