From ffc7f7ecf432755b1b4f59bfd9f180c9a23c97d9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 4 Jan 2018 20:10:13 +0900 Subject: [PATCH] Add a better slider "hit" state fade out animation --- .../Objects/Drawables/DrawableSlider.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs index 5a8bcae277..2a7a42a5a5 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSlider.cs @@ -161,11 +161,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables using (BeginDelayedSequence(slider.Duration, true)) { - Body.FadeOut(160); - Ball.FadeOut(160); + Body.FadeOut(450, Easing.OutQuint); + Ball.FadeOut(450, Easing.OutQuint); - this.FadeOut(800) - .Expire(); + switch (state) + { + case ArmedState.Idle: + break; + case ArmedState.Hit: + Ball.ScaleTo(HitObject.Scale * 1.5f, 450, Easing.OutQuint); + break; + case ArmedState.Miss: + break; + } + + this.FadeOut(800, Easing.Out).Expire(); } }