Change taiko hit explosion animation to match stable for skins

This commit is contained in:
Dean Herbert
2020-04-29 17:53:25 +09:00
parent 0375bbfde1
commit 48733a7e2f
3 changed files with 18 additions and 11 deletions

View File

@ -23,6 +23,12 @@ namespace osu.Game.Rulesets.Taiko.UI
[Cached(typeof(DrawableHitObject))]
public readonly DrawableHitObject JudgedObject;
private SkinnableDrawable skinnable;
public override double LifetimeStart => skinnable.Drawable.LifetimeStart;
public override double LifetimeEnd => skinnable.Drawable.LifetimeEnd;
public HitExplosion(DrawableHitObject judgedObject)
{
JudgedObject = judgedObject;
@ -39,7 +45,7 @@ namespace osu.Game.Rulesets.Taiko.UI
[BackgroundDependencyLoader]
private void load()
{
Child = new SkinnableDrawable(new TaikoSkinComponent(getComponentName(JudgedObject.Result?.Type ?? HitResult.Great)), _ => new DefaultHitExplosion());
Child = skinnable = new SkinnableDrawable(new TaikoSkinComponent(getComponentName(JudgedObject.Result?.Type ?? HitResult.Great)), _ => new DefaultHitExplosion());
}
private TaikoSkinComponents getComponentName(HitResult resultType)
@ -59,14 +65,6 @@ namespace osu.Game.Rulesets.Taiko.UI
throw new ArgumentOutOfRangeException(nameof(resultType), "Invalid result type");
}
protected override void LoadComplete()
{
base.LoadComplete();
this.FadeOut(500);
Expire(true);
}
/// <summary>
/// Transforms this hit explosion to visualise a secondary hit.
/// </summary>