24 lines
382 B
C#
24 lines
382 B
C#
using UnityEngine;
|
|
|
|
namespace DarkTonic.MasterAudio.Examples
|
|
{
|
|
public class MA_DestroyFinishedParticle : MonoBehaviour
|
|
{
|
|
private ParticleSystem particles;
|
|
|
|
private void Awake()
|
|
{
|
|
base.useGUILayout = false;
|
|
particles = GetComponent<ParticleSystem>();
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (!particles.IsAlive())
|
|
{
|
|
Object.Destroy(base.gameObject);
|
|
}
|
|
}
|
|
}
|
|
}
|