1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 12:03:20 +08:00

Added separate scrolling track to display drum roll notes

This commit is contained in:
Tim Oliver 2020-04-07 16:40:32 +08:00
parent 7c3c198212
commit 3fec213c92

View File

@ -42,6 +42,7 @@ namespace osu.Game.Rulesets.Taiko.UI
private readonly Container<HitExplosion> hitExplosionContainer;
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;
private readonly JudgementContainer<DrawableTaikoJudgement> judgementContainer;
private readonly ScrollingHitObjectContainer drumRollHitContainer;
internal readonly HitTarget HitTarget;
private readonly ProxyContainer topLevelHitContainer;
@ -135,6 +136,14 @@ namespace osu.Game.Rulesets.Taiko.UI
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
Blending = BlendingParameters.Additive
},
drumRollHitContainer = new ScrollingHitObjectContainer
{
Name = "Drumroll hit",
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Stretch,
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
Width = 1.0f
}
}
},
overlayBackgroundContainer = new Container
@ -212,12 +221,28 @@ namespace osu.Game.Rulesets.Taiko.UI
barlineContainer.Add(barline.CreateProxy());
break;
case DrawableDrumRoll drumRoll:
drumRoll.OnHit += onDrumrollArbitraryHit;
break;
case DrawableTaikoHitObject taikoObject:
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
break;
}
}
private void onDrumrollArbitraryHit(TaikoAction action)
{
DrawableHit drawableHit;
if (action == TaikoAction.LeftRim || action == TaikoAction.RightRim)
drawableHit = new DrawableFlyingRimHit(Time.Current);
else
drawableHit = new DrawableFlyingCentreHit(Time.Current);
drumRollHitContainer.Add(drawableHit);
}
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
{
if (!DisplayJudgements.Value)