Files
MetalGear2D.Unity/Assets/Scripts/DestroySelf.cs
T
2025-05-13 05:19:58 +03:00

22 lines
341 B
C#

using UnityEngine;
using System.Collections;
public class DestroySelf : MonoBehaviour {
public float timeout = 1.0f;
private float time = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
time += Time.deltaTime;
if(time >= timeout){
Destroy(gameObject);
}
}
}