StopEmittingAfterDelay

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
Author: Jon (Aarku)
+
Author: Jonathan Czeck (aarku)
----
+
==Description==
Use this script on a particle emitter with Autodestruct on.
+
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
After it stops emitting, the particles will fade naturally then
+
 
the object will get destroyed.
+
==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==
 
  using UnityEngine;
 
  using UnityEngine;
 
  using System.Collections;
 
  using System.Collections;
 
// 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.
 
 
   
 
   
 
  public class StopEmittingAfterDelay : MonoBehaviour
 
  public class StopEmittingAfterDelay : MonoBehaviour

Revision as of 07:06, 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

using UnityEngine;
using System.Collections;

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

Variants
Actions
Navigation
Extras
Toolbox