private void Update() { // Will return either same state or next state. currentState = currentState.Process(); }
private void Start() { agent = this.GetComponent <NavMeshAgent>(); anim = this.GetComponent <Animator>(); currentState = new Idle(this.gameObject, agent, anim, player); }