mirror of
https://github.com/ppy/osu.git
synced 2024-12-18 02:02:54 +08:00
Added separate scrolling track to display drum roll notes
This commit is contained in:
parent
7c3c198212
commit
3fec213c92
@ -42,6 +42,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
private readonly Container<HitExplosion> hitExplosionContainer;
|
private readonly Container<HitExplosion> hitExplosionContainer;
|
||||||
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;
|
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;
|
||||||
private readonly JudgementContainer<DrawableTaikoJudgement> judgementContainer;
|
private readonly JudgementContainer<DrawableTaikoJudgement> judgementContainer;
|
||||||
|
private readonly ScrollingHitObjectContainer drumRollHitContainer;
|
||||||
internal readonly HitTarget HitTarget;
|
internal readonly HitTarget HitTarget;
|
||||||
|
|
||||||
private readonly ProxyContainer topLevelHitContainer;
|
private readonly ProxyContainer topLevelHitContainer;
|
||||||
@ -135,6 +136,14 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
|
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
|
||||||
Blending = BlendingParameters.Additive
|
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
|
overlayBackgroundContainer = new Container
|
||||||
@ -212,12 +221,28 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
barlineContainer.Add(barline.CreateProxy());
|
barlineContainer.Add(barline.CreateProxy());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DrawableDrumRoll drumRoll:
|
||||||
|
drumRoll.OnHit += onDrumrollArbitraryHit;
|
||||||
|
break;
|
||||||
|
|
||||||
case DrawableTaikoHitObject taikoObject:
|
case DrawableTaikoHitObject taikoObject:
|
||||||
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
|
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
|
||||||
break;
|
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)
|
internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
|
||||||
{
|
{
|
||||||
if (!DisplayJudgements.Value)
|
if (!DisplayJudgements.Value)
|
||||||
|
Loading…
Reference in New Issue
Block a user