private void Awake() { _eState = GetComponent <EnemyState>(); _navAgent = GetComponent <NavMeshAgent>(); _anims = GetComponent <Animator>(); }
// Start is called before the first frame update void Start() { _state = GetComponent <EnemyState>(); _state.OnStateChange.AddListener(OnEnemyStateChange); _lastStepPos = transform.position; }