From 178934547d835d28b628ccc884e20a5b23b437d4 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 9 Aug 2021 20:00:32 +0800 Subject: =?UTF-8?q?+=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs (limited to 'Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs') diff --git a/Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs b/Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs new file mode 100644 index 00000000..7add8138 --- /dev/null +++ b/Assets/Art/Vfx/Hit & Slashes Vol.3/SelfDestruct.cs @@ -0,0 +1,13 @@ +using UnityEngine; +using System.Collections; + + +public class SelfDestruct : MonoBehaviour { + public float selfdestruct_in = 4; // Setting this to 0 means no selfdestruct. + + void Start () { + if ( selfdestruct_in != 0){ + Destroy (gameObject, selfdestruct_in); + } + } +} -- cgit v1.1-26-g67d0