public override void Enter(PlayerStateEntry upperState) { if (upperState.GetPreState() == jumping) { currentState = attackingInAir; } else { currentState = attackingFirst; } currentState.Enter(this); }
public override void IsChanging(PlayerStateEntry upperState) { AnimatorStateInfo info = anim.GetCurrentAnimatorStateInfo(0); float endTime = info.normalizedTime; if (status.GetDamaged()) { upperState.ChangeState(damaging); } else if (endTime >= 0.65f && (info.IsName("Attack1") || info.IsName("Attack2") || info.IsName("Attack3"))) { upperState.ChangeState(upperState.GetPreState()); } }