Game Development Reference
In-Depth Information
Max Emission : 12
Local Velocity : X: 0 , Y: 0.75 , Z: 0
Rnd Velocity : X: 0 , Y: 0 , Z: 0
Ellispsoid: X: 0.1 , Y: 0 , Z: 0.1
Particle Animator :
Color Animation[0] : R: 162 , G: 162 , B: 162 , A: 0
Color Animation[1] : R: 147 , G: 147 , B: 147 , A: 199
Color Animation[2] : R: 114 , G: 114 , B: 114 , A: 143
Color Animation[3] : R: 126 , G: 126 , B: 126 , A: 87
Color Animation[4] : R: 59 , G: 59 , B: 59 , A: 0
Size Grow : -0.1
Rnd Force : X: 0 , Y: 0 , Z: 0
4. Create the Smoke script by going to Assets | Create | Javascript and name it Smoke .
Then, we go to the script and type the following code:
public var timeOut : float = 0.5; // Destroy after 0.5 seconds.
// Use this for initialization
public function Start () : void {
Invoke("KillObject", timeOut);
}
public function KillObject () : void {
//Stop the emit the particle
var emitter : ParticleEmitter = GetComponentInChildren(ParticleE
mitter);
if (emitter != null) {
emitter.emit = false; // Stop Emit
}
//In here We set the particle to auto destruct to destroy itself
after a life time (or we can setup it up in the editor)
var particleAnimator : ParticleAnimator = GetComponentInChildren
(ParticleAnimator);
if (particleAnimator != null) {
particleAnimator.autodestruct = true;
}
}
 
Search WWH ::




Custom Search