1
Fork 0
slime-blood-and-pain/Assets/Scripts/DestroySelfAfterSomeTime.cs

16 lines
324 B
C#
Raw Normal View History

2019-04-29 08:39:48 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroySelfAfterSomeTime : MonoBehaviour {
[BeforeStartAttribute]
public float time = 1f;
protected void Start() {
2019-04-29 12:35:35 +00:00
Invoke("Delet", time);
2019-04-29 08:39:48 +00:00
}
2019-04-29 12:35:35 +00:00
protected void Delet() {
2019-04-29 08:39:48 +00:00
Destroy(gameObject);
}
}