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); }
private void OnKilledPlayer() { currentState = pauseState; }
public void SetCurrentState(ICharacterAiStateMachine state) { currentState = state; }