EndlessRocket/Assets/Inguz Media Studio/Free 2D Impact FX/Script/SelfDestruct.cs
2023-07-30 23:14:41 +05:30

21 lines
302 B
C#

using UnityEngine;
using System.Collections;
namespace InguzPings
{
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);
}
}
}
}