From 0ecbc5945f3a93914756d42baf459bc2a9cd14c9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 6 Jul 2018 12:07:39 +0900 Subject: [PATCH] Adjust transform to look better --- osu.Game/Graphics/Containers/ShakeContainer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game/Graphics/Containers/ShakeContainer.cs b/osu.Game/Graphics/Containers/ShakeContainer.cs index 33fba390d6..3316fb5306 100644 --- a/osu.Game/Graphics/Containers/ShakeContainer.cs +++ b/osu.Game/Graphics/Containers/ShakeContainer.cs @@ -10,15 +10,15 @@ namespace osu.Game.Graphics.Containers { public void Shake() { - const int shake_amount = 8; - const int shake_duration = 20; + const float shake_amount = 8; + const float shake_duration = 30; - this.MoveToX(shake_amount, shake_duration).Then() - .MoveToX(-shake_amount, shake_duration).Then() - .MoveToX(shake_amount, shake_duration).Then() - .MoveToX(-shake_amount, shake_duration).Then() - .MoveToX(shake_amount, shake_duration).Then() - .MoveToX(0, shake_duration); + this.MoveToX(shake_amount, shake_duration / 2, Easing.OutSine).Then() + .MoveToX(-shake_amount, shake_duration, Easing.InOutSine).Then() + .MoveToX(shake_amount, shake_duration, Easing.InOutSine).Then() + .MoveToX(-shake_amount, shake_duration, Easing.InOutSine).Then() + .MoveToX(shake_amount, shake_duration, Easing.InOutSine).Then() + .MoveToX(0, shake_duration / 2, Easing.InSine); } } }