1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Removed modifications to drum roll object

This commit is contained in:
Tim Oliver 2020-04-25 00:15:37 +08:00
parent 029d15f2a2
commit 2be3a8184d

View File

@ -36,14 +36,6 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
private Color4 colourIdle;
private Color4 colourEngaged;
private bool judgingStarted;
/// <summary>
/// A handler action for when the drumroll has been hit,
/// regardless of any judgement.
/// </summary>
public Action<TaikoAction, bool> OnHit;
public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll)
{
@ -103,27 +95,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.DrumRollBody),
_ => new ElongatedCirclePiece());
public override bool OnPressed(TaikoAction action)
{
if (judgingStarted)
OnHit.Invoke(action, HitObject.IsStrong);
return false;
}
public override bool OnPressed(TaikoAction action) => false;
private void onNewResult(DrawableHitObject obj, JudgementResult result)
{
if (!(obj is DrawableDrumRollTick))
return;
DrawableDrumRollTick drumRollTick = (DrawableDrumRollTick)obj;
if (result.Type > HitResult.Miss)
{
OnHit.Invoke(drumRollTick.JudgedAction, HitObject.IsStrong);
judgingStarted = true;
rollingHits++;
}
else
rollingHits--;