// Use this for initialization void Start() { agent = GetComponent <NavMeshAgent>(); setPosition = GetComponent <SetEnemy>(); agent.speed = 1; SetState("wait"); }
private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } }