// 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) { playerPos = GameObject.FindGameObjectWithTag("Player2").GetComponent <Transform>(); timer = Random.Range(minTime, maxTime); boss = GameObject.FindGameObjectWithTag("boss1").GetComponent <boss1>(); }
// 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) { boss = animator.GetComponent <boss1>(); boss.isDead = true; }