mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Add IsBasic() and IsTick() extensions on HitResult
This commit is contained in:
parent
719331420c
commit
a172fc6cb8
@ -133,6 +133,30 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
public static bool AffectsAccuracy(this HitResult result)
|
public static bool AffectsAccuracy(this HitResult result)
|
||||||
=> IsScorable(result) && !IsBonus(result);
|
=> IsScorable(result) && !IsBonus(result);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a <see cref="HitResult"/> is a non-tick and non-bonus result.
|
||||||
|
/// </summary>
|
||||||
|
public static bool IsBasic(this HitResult result)
|
||||||
|
=> IsScorable(result) && !IsTick(result) && !IsBonus(result);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether a <see cref="HitResult"/> should be counted as a tick.
|
||||||
|
/// </summary>
|
||||||
|
public static bool IsTick(this HitResult result)
|
||||||
|
{
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
case HitResult.LargeTickHit:
|
||||||
|
case HitResult.LargeTickMiss:
|
||||||
|
case HitResult.SmallTickHit:
|
||||||
|
case HitResult.SmallTickMiss:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether a <see cref="HitResult"/> should be counted as bonus score.
|
/// Whether a <see cref="HitResult"/> should be counted as bonus score.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user