예제 #1
0
    void Awake()
    {

        //target = GameObject.FindGameObjectWithTag("Hero").transform;
        //leftHandTarget = GameObject.FindGameObjectWithTag("IkTarget").transform;
		go = gameObject;
        agent = GetComponent<NavMeshAgent>();
        rb = GetComponent<Rigidbody>();
        anim = GetComponent<Animator>();
        animEvents = GetComponent<EnemyAnimationEvents>();
        idleState = new EvolIdleState(gameObject);
        patrolState = new EvolPatrolState(gameObject);
        attackState = new EvolAttackState(gameObject);
        pauseState = new EvolPauseState(gameObject);
        enemyState = new EvolEnemyState(gameObject);
        currentState = new EvolPatrolState(gameObject);

    }
예제 #2
0
 private void OnKilledPlayer()
 {
     currentState = pauseState;
 }
예제 #3
0
 public void SetCurrentState(ICharacterAiStateMachine state)
 {
     currentState = state;
 }