void Awake() { theController = GetComponent <NpcMovement>(); patrolState = new PatrolState(this, theController); chaseState = new ChaseState(this, theController); controlledState = new ControlledState(this, theController); }
private void Awake() { Instance = this; Body = GetComponent <Rigidbody2D>(); Colliders = GetComponentsInChildren <Collider2D>(); interactables = new List <Interactable>(); animator = GetComponentInChildren <Animator>(); ForceMovement = ControlledState.Idle; }