public static GreyClaw_DeadState Instance() { if (_instance == null) { _instance = new GreyClaw_DeadState(); } return(_instance); }
private void FixedUpdate() { if (health > 0) { if (IsStaggered == true) { StopCoroutine("AttackCo"); StartCoroutine("AttackCo", attackDelayAfterDamage); } CheckDistance(); } else if (stateMachine.currentState != GreyClaw_DeadState.Instance()) { StopCoroutine("AttackCo"); stateMachine.ChangeState(GreyClaw_DeadState.Instance()); } stateMachine.Update(); }