blob: b25c8ff84c72963cd3a9b72af02100ed14e5c89d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
using UnityEngine;
using System.Collections;
namespace Pathfinding.Examples.RTS {
[HelpURL("https://arongranberg.com/astar/documentation/stable/rtstimeddestruction.html")]
public class RTSTimedDestruction : MonoBehaviour {
public float time = 1f;
// Use this for initialization
IEnumerator Start () {
yield return new WaitForSeconds(time);
GameObject.Destroy(gameObject);
}
}
}
|