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

21 lines
327 B
C#
Raw Permalink Normal View History

2022-05-18 13:44:19 +00:00
using UnityEngine;
using System.Collections;
2022-05-23 13:39:59 +00:00
public class ImpactEffect : MonoBehaviour {
2022-05-18 13:44:19 +00:00
2022-05-23 13:39:59 +00:00
private ParticleSystem ps;
2022-05-18 13:44:19 +00:00
// Use this for initialization
void Start () {
2022-05-23 13:39:59 +00:00
ps = GetComponent<ParticleSystem>();
2022-05-18 13:44:19 +00:00
}
// Update is called once per frame
void Update () {
2022-05-23 13:39:59 +00:00
if (!ps.IsAlive()){
Destroy(gameObject);
}
2022-05-18 13:44:19 +00:00
}
}