1
Fork 0
slime-blood-and-pain/Assets/Scripts/DestroySelfAfterSomeTime.cs
2019-04-29 14:35:35 +02:00

16 lines
No EOL
324 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroySelfAfterSomeTime : MonoBehaviour {
[BeforeStartAttribute]
public float time = 1f;
protected void Start() {
Invoke("Delet", time);
}
protected void Delet() {
Destroy(gameObject);
}
}