1
0
mirror of https://github.com/ppy/osu.git synced 2024-05-14 13:10:20 +08:00
osu-lazer/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNoteBody.cs
Bartłomiej Dach efe6bb25b1
Refactor result application around again to remove requirement for fields
Co-authored-by: Dean Herbert <pe@ppy.sh>
2024-02-05 13:21:01 +01:00

35 lines
837 B
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
public partial class DrawableHoldNoteBody : DrawableManiaHitObject<HoldNoteBody>
{
public bool HasHoldBreak => AllJudged && !IsHit;
public override bool DisplayResult => false;
public DrawableHoldNoteBody()
: this(null)
{
}
public DrawableHoldNoteBody(HoldNoteBody hitObject)
: base(hitObject)
{
}
internal void TriggerResult(bool hit)
{
if (AllJudged) return;
if (hit)
ApplyMaxResult();
else
ApplyMinResult();
}
}
}