SuccessfulHitWindow->SuccessfulHitResult

This commit is contained in:
Ivan Pavluk
2018-12-10 09:04:12 +07:00
parent 77a544e475
commit 8457324044
3 changed files with 14 additions and 7 deletions

View File

@ -51,9 +51,9 @@ namespace osu.Game.Rulesets.Objects
public double Miss { get; protected set; }
/// <summary>
/// Hit window for a non-<see cref="HitResult.Miss"/> result.
/// The <see cref="HitResult"/> with the largest hit window that produces a successful hit.
/// </summary>
protected virtual double SuccessfulHitWindow => Meh;
protected virtual HitResult SuccessfulHitResult => HitResult.Meh;
/// <summary>
/// Whether it's possible to achieve this <see cref="HitResult"/>.
@ -136,6 +136,6 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
/// <param name="timeOffset">The time offset.</param>
/// <returns>Whether the <see cref="HitObject"/> can be hit at any point in the future from this time offset.</returns>
public bool CanBeHit(double timeOffset) => timeOffset <= SuccessfulHitWindow / 2;
public bool CanBeHit(double timeOffset) => timeOffset <= HalfWindowFor(SuccessfulHitResult);
}
}