mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
24 lines
428 B
C#
24 lines
428 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class SelfDestroy : MonoBehaviour
|
|
{
|
|
public GameObject PrefabPs;
|
|
|
|
private ParticleSystem ps;
|
|
|
|
// Use this for initialization
|
|
public void Start ()
|
|
{
|
|
ps = PrefabPs.GetComponent<ParticleSystem>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
public void FixedUpdate () {
|
|
if (ps && !ps.IsAlive())
|
|
{
|
|
Destroy(this.gameObject);
|
|
}
|
|
}
|
|
}
|