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 colourIdle;
private Color4 colourEngaged; 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) public DrawableDrumRoll(DrumRoll drumRoll)
: base(drumRoll) : base(drumRoll)
{ {
@ -103,27 +95,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.DrumRollBody), protected override SkinnableDrawable CreateMainPiece() => new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.DrumRollBody),
_ => new ElongatedCirclePiece()); _ => new ElongatedCirclePiece());
public override bool OnPressed(TaikoAction action) public override bool OnPressed(TaikoAction action) => false;
{
if (judgingStarted)
OnHit.Invoke(action, HitObject.IsStrong);
return false;
}
private void onNewResult(DrawableHitObject obj, JudgementResult result) private void onNewResult(DrawableHitObject obj, JudgementResult result)
{ {
if (!(obj is DrawableDrumRollTick)) if (!(obj is DrawableDrumRollTick))
return; return;
DrawableDrumRollTick drumRollTick = (DrawableDrumRollTick)obj;
if (result.Type > HitResult.Miss) if (result.Type > HitResult.Miss)
{
OnHit.Invoke(drumRollTick.JudgedAction, HitObject.IsStrong);
judgingStarted = true;
rollingHits++; rollingHits++;
}
else else
rollingHits--; rollingHits--;