Exemplo n.º 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);

    }
Exemplo n.º 2
0
 private void OnKilledPlayer()
 {
     currentState = pauseState;
 }
Exemplo n.º 3
0
 public void SetCurrentState(ICharacterAiStateMachine state)
 {
     currentState = state;
 }