mergemilitary/Assets/ThirdPlugins/EasyTouchBundle/EasyTouchControls/Examples/Version 1.X/FPSExample/ImpactEffect.cs

21 lines
327 B
C#

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