mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 07:22:54 +08:00
Inline empty explosion in legacy transformer
This commit is contained in:
parent
be4735cd2b
commit
891218ec6b
@ -118,7 +118,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning
|
|||||||
// suppress the default kiai explosion if the skin brings its own sprites.
|
// suppress the default kiai explosion if the skin brings its own sprites.
|
||||||
// the drawable needs to expire as soon as possible to avoid accumulating empty drawables on the playfield.
|
// the drawable needs to expire as soon as possible to avoid accumulating empty drawables on the playfield.
|
||||||
if (hasExplosion.Value)
|
if (hasExplosion.Value)
|
||||||
return KiaiHitExplosion.EmptyExplosion();
|
return Drawable.Empty().With(d => d.LifetimeEnd = double.MinValue);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -43,11 +43,5 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
Child = skinnable = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoExplosionKiai), _ => new DefaultKiaiHitExplosion(hitType));
|
Child = skinnable = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.TaikoExplosionKiai), _ => new DefaultKiaiHitExplosion(hitType));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Helper function to use when an explosion is not desired.
|
|
||||||
/// Lifetime is set to avoid accumulating empty drawables in the parent container.
|
|
||||||
/// </summary>
|
|
||||||
public static Drawable EmptyExplosion() => Empty().With(d => d.LifetimeEnd = double.MinValue);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user