Game Development Reference
In-Depth Information
Figure 8-14. Settings for the legacy SmallExplosion2
Emission is the amount of particles. Energy is how long the individual particles live. (Try setting max
to 6 to see the difference.) Velocity is the speed of the particles. Ellipsoid is the size of the emitter.
The color array blends the color over the age of the particles. Autodestruct kills the particles when
they have finished if One Shot is on. Shadows are not cast or received on billboard-type particles.
7.
Click Play.
With One Shot turned on, the particle system destroys itself after it finishes.
8.
Stop Play mode.
9.
Create a new folder in the Prefabs folder, and name it FX .
10.
Drag SmallExplosion2 into the new FX folder.
11.
Delete the SmallExplosion2 object in the scene.
Next you will incorporate the explosion into the Projectile script.
1.
Open the Projectile script.
2.
Add a variable for the explosion:
public GameObject explosion; // the particle system associated with projectile
Search WWH ::




Custom Search