StopEmittingAfterDelay

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(C# - StopEmittingAfterDelay.cs)
Line 1: Line 1:
 +
[[Category: MonoBehaviour]]
 +
[[Category: ParticleEmitter]]
 +
[[Category: Particle Effects]]
 +
[[Category: C Sharp]]
 
Author: Jonathan Czeck (aarku)
 
Author: Jonathan Czeck (aarku)
 
==Description==
 
==Description==

Revision as of 21:56, 1 December 2005

Author: Jonathan Czeck (aarku)

Description

Use this script on a particle emitter with Autodestruct on. After it stops emitting, the particles will fade naturally then the object will get destroyed. FIXME

Usage

Use this script on a particle emitter with Autodestruct on. After it stops emitting, the particles will fade naturally then the object will get destroyed. FIXME

C# - StopEmittingAfterDelay.cs

<csharp> using UnityEngine;

using System.Collections;

public class StopEmittingAfterDelay : MonoBehaviour
{
	public float delay = 1F;
	
	void Start()
	{
		Invoke("StopEmitting", delay);
	}
	
	void StopEmitting()
 	{
		particleEmitter.emit = false;
	}
}

</csharp>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox