CapersProject/Packages/com.arongranberg.astar/ExampleScenes~/Scenes/OldExamples/Example18_RTS/RTSTimedDestruction.cs

16 lines
397 B
C#
Raw Normal View History

2024-06-03 18:26:03 +00:00
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);
}
}
}