1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-18 02:43:22 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Judgements/HoldNoteTailJudgement.cs

39 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-09-05 18:44:59 +08:00
using osu.Game.Rulesets.Objects.Drawables;
namespace osu.Game.Rulesets.Mania.Judgements
{
public class HoldNoteTailJudgement : ManiaJudgement
{
/// <summary>
/// Whether the hold note has been released too early and shouldn't give full score for the release.
/// </summary>
public bool HasBroken;
2017-05-26 18:28:14 +08:00
2017-09-05 18:44:59 +08:00
protected override int NumericResultFor(HitResult result)
2017-05-26 18:28:14 +08:00
{
switch (result)
{
default:
2017-09-05 18:44:59 +08:00
return base.NumericResultFor(result);
case HitResult.Great:
case HitResult.Perfect:
return base.NumericResultFor(HasBroken ? HitResult.Good : result);
2017-05-26 18:28:14 +08:00
}
}
2017-09-05 18:44:59 +08:00
protected override int NumericResultForAccuracy(HitResult result)
2017-05-26 18:28:14 +08:00
{
switch (result)
{
default:
return base.NumericResultForAccuracy(result);
2017-09-05 18:44:59 +08:00
case HitResult.Great:
case HitResult.Perfect:
return base.NumericResultForAccuracy(HasBroken ? HitResult.Good : result);
2017-05-26 18:28:14 +08:00
}
}
}
}