override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { boss = animator.GetComponent <Boss>(); boss.canBeHit = true; animator.GetComponentInChildren <BossWeapon>().enraged = true; eggmanBoss = animator.GetComponentInChildren <DrEggmanBoss>(); eggmanBoss.setMadSprite(); }
// 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 <Boss>(); eggmanBoss = animator.GetComponentInChildren <DrEggmanBoss>(); Boss.canBeHit = false; }