예제 #1
0
    private void Awake()
    {
        attackState = new AttackState(this);
        chaseState  = new ChaseState(this);
        patrolState = new PatrolState(this);

        currentState = patrolState;
    }
예제 #2
0
    private void Awake()
    {
        agent = GetComponent <aAgent>();
        anim  = GetComponentInChildren <Animator> ();

        patrolState = new PatrolState(this);
        chaseState  = new ChaseState(this);

        currentState = patrolState;
    }
예제 #3
0
 public StateContext(EnemyBehaviour enemy, DetectPlayer detect)
 {
     this.enemy   = enemy;
     this.detect  = detect;
     CurrentState = EnemyStates.Patrol;
 }