mirror of https://github.com/ppy/osu
Make taiko major bar line triangles show up again. Fixes #1081
This commit is contained in:
parent
7a5708ce92
commit
6a7e868a2e
|
@ -20,10 +20,12 @@ public class DrawableBarLineMajor : DrawableBarLine
|
|||
/// </summary>
|
||||
private const float triangle_size = 20f;
|
||||
|
||||
private readonly Container triangleContainer;
|
||||
|
||||
public DrawableBarLineMajor(BarLine barLine)
|
||||
: base(barLine)
|
||||
{
|
||||
Add(new Container
|
||||
Add(triangleContainer = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -53,5 +55,13 @@ public DrawableBarLineMajor(BarLine barLine)
|
|||
|
||||
Tracker.Alpha = 1f;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
using (triangleContainer.BeginAbsoluteSequence(HitObject.StartTime))
|
||||
triangleContainer.FadeOut(150);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,8 @@ public class TaikoPlayfield : ScrollingPlayfield<TaikoHitObject, TaikoJudgement>
|
|||
|
||||
private readonly Container topLevelHitContainer;
|
||||
|
||||
private readonly Container barlineContainer;
|
||||
|
||||
private readonly Container overlayBackgroundContainer;
|
||||
private readonly Container backgroundContainer;
|
||||
|
||||
|
@ -85,7 +87,7 @@ public TaikoPlayfield()
|
|||
{
|
||||
new Container
|
||||
{
|
||||
Name = "Masked elements",
|
||||
Name = "Masked elements before hit objects",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET },
|
||||
Masking = true,
|
||||
|
@ -103,13 +105,21 @@ public TaikoPlayfield()
|
|||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
FillMode = FillMode.Fit
|
||||
},
|
||||
content = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
barlineContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET }
|
||||
},
|
||||
content = new Container
|
||||
{
|
||||
Name = "Hit objects",
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET },
|
||||
Masking = true
|
||||
},
|
||||
kiaiExplosionContainer = new Container<KiaiHitExplosion>
|
||||
{
|
||||
Name = "Kiai hit explosions",
|
||||
|
@ -198,6 +208,10 @@ public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
|
|||
|
||||
base.Add(h);
|
||||
|
||||
var barline = h as DrawableBarLine;
|
||||
if (barline != null)
|
||||
barlineContainer.Add(barline.CreateProxy());
|
||||
|
||||
// Swells should be moved at the very top of the playfield when they reach the hit target
|
||||
var swell = h as DrawableSwell;
|
||||
if (swell != null)
|
||||
|
@ -239,4 +253,4 @@ public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgemen
|
|||
hitExplosionContainer.Children.FirstOrDefault(e => e.Judgement == judgedObject.Judgement)?.VisualiseSecondHit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue