private void Awake() { attackState = new AttackState(this); chaseState = new ChaseState(this); patrolState = new PatrolState(this); currentState = patrolState; }
private void Awake() { agent = GetComponent <aAgent>(); anim = GetComponentInChildren <Animator> (); patrolState = new PatrolState(this); chaseState = new ChaseState(this); currentState = patrolState; }
public StateContext(EnemyBehaviour enemy, DetectPlayer detect) { this.enemy = enemy; this.detect = detect; CurrentState = EnemyStates.Patrol; }