Files
DeviantMobile-Rohan/Assets/Hit & Slashes Vol.3 copy/SelfDestruct.cs

14 lines
273 B
C#

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);
}
}
}