1
0
Fork 0
Bildschirmflausch-LD41/Assets/Scripts/Destroyer.cs
2018-04-23 22:27:46 +02:00

19 lines
408 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Destroyer : MonoBehaviour {
ParticleSystem ps;
// Use this for initialization
void Start () {
ps = GetComponent<ParticleSystem>();
ps.Play();
}
// Update is called once per frame
void Update () {
if(ps != null && !ps.isPlaying) {
Destroy(this.gameObject);
}
}
}