chunk 2: remaining non-audio non-NewImport assets
This commit is contained in:
13
Assets/Hit & Slashes Vol.3 copy/SelfDestruct.cs
Normal file
13
Assets/Hit & Slashes Vol.3 copy/SelfDestruct.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user