From ffd1d5af496e0a0eff343b27c4f0f965bbbf79eb Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 31 Aug 2021 19:07:21 +0800 Subject: *projectile --- .../StylizedProjectilePack1/scripts/destroyMe.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Assets/Art/Vfx/StylizedProjectilePack1/scripts/destroyMe.cs (limited to 'Assets/Art/Vfx/StylizedProjectilePack1/scripts/destroyMe.cs') diff --git a/Assets/Art/Vfx/StylizedProjectilePack1/scripts/destroyMe.cs b/Assets/Art/Vfx/StylizedProjectilePack1/scripts/destroyMe.cs new file mode 100644 index 00000000..cb8061db --- /dev/null +++ b/Assets/Art/Vfx/StylizedProjectilePack1/scripts/destroyMe.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using System.Collections; + +public class destroyMe : MonoBehaviour{ + + float timer; + public float deathtimer = 10; + + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () + { + timer += Time.deltaTime; + + if(timer >= deathtimer) + { + Destroy(gameObject); + } + + } +} -- cgit v1.1-26-g67d0