Exemplo n.º 1
0
    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        RandomEnemyAi enemyAi = animator.gameObject.GetComponent <RandomEnemyAi>();

        enemyAi.StopChasing();
    }
Exemplo n.º 2
0
 void OnTriggerExit2D(Collider2D other)
 {
     enemyAi.StopChasing();
 }