// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state public override void OnStateEnter(Animator animator, AnimatorStateInfo animatorStateInfo, int layerIndex) { IA = animator.gameObject.GetComponent <EnemyIA>(); IA.ChangeFOVColor(EnemyIA.FOVColor.searching); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { IA = animator.gameObject.GetComponent <EnemyIA>(); IA.ChangeFOVColor(EnemyIA.FOVColor.chasing); IA.Catched(); }