CapersProject/Packages/com.arongranberg.astar/ExampleScenes~/Scenes/OldExamples/Example18_RTS/RTSTimedDestruction.cs
2024-06-04 03:26:03 +09:00

16 lines
397 B
C#

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);
}
}
}