StopEmittingAfterDelay
From Unify Community Wiki
(Difference between revisions)
(→C# - StopEmittingAfterDelay.cs) |
|||
Line 7: | Line 7: | ||
==C# - StopEmittingAfterDelay.cs== | ==C# - StopEmittingAfterDelay.cs== | ||
+ | <csharp> | ||
using UnityEngine; | using UnityEngine; | ||
using System.Collections; | using System.Collections; | ||
Line 24: | Line 25: | ||
} | } | ||
} | } | ||
+ | </csharp> |
Revision as of 17:47, 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>