mirror of https://github.com/ppy/osu
Hide test hit directly in explosion scene
This commit is contained in:
parent
b64e69fabd
commit
095686a320
|
@ -22,6 +22,12 @@ public DrawableTestHit(Hit hit, HitResult type = HitResult.Great)
|
|||
HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||
}
|
||||
|
||||
protected override void UpdateInitialTransforms()
|
||||
{
|
||||
// base implementation in DrawableHitObject forces alpha to 1.
|
||||
// suppress locally to allow hiding the visuals wherever necessary.
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
|
|
@ -35,7 +35,9 @@ private Drawable getContentFor(DrawableTestHit hit)
|
|||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
hit,
|
||||
// the hit needs to be added to hierarchy in order for nested objects to be created correctly.
|
||||
// setting zero alpha is supposed to prevent the test from looking broken.
|
||||
hit.With(h => h.Alpha = 0),
|
||||
new HitExplosion(hit, hit.Type)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
|
|
Loading…
Reference in New Issue