protected new IEnumerator StunState() { if (stunAnimator.state == StunAnimator.State.Nothing) { stunAnimator.state = StunAnimator.State.IsHit; } //Debug.Log("IsHitState : " + stunAnimator.state + " // stunstate = "+ stunAnimator.state); while (stunAnimator.state != StunAnimator.State.Nothing) { yield return(0); if (stunAnimator.state == StunAnimator.State.Nothing) { state = State.Idle; if (bossBehaviour.getPhase() == 2 && !bossBehaviour.isDead()) { bossBehaviour.setInvulnerable(); } } } GoToNextState(); }