From 3d500500899c27f2dc634cb12363ff5ebdd2e2b4 Mon Sep 17 00:00:00 2001 From: tgi74000 Date: Fri, 29 Jun 2018 10:36:00 +0200 Subject: [PATCH] Move shake duration to a constant --- .../Objects/Drawables/DrawableOsuHitObject.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs index c02d711ee8..f25ddc4d82 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs @@ -62,13 +62,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables protected void Shake() { const int shake_amount = 8; + const int shake_duration = 20; - this.MoveToX(Position.X + shake_amount, 20).Then() - .MoveToX(Position.X - shake_amount, 20).Then() - .MoveToX(Position.X + shake_amount, 20).Then() - .MoveToX(Position.X - shake_amount, 20).Then() - .MoveToX(Position.X + shake_amount, 20).Then() - .MoveToX(Position.X, 20); + this.MoveToX(Position.X + shake_amount, shake_duration).Then() + .MoveToX(Position.X - shake_amount, shake_duration).Then() + .MoveToX(Position.X + shake_amount, shake_duration).Then() + .MoveToX(Position.X - shake_amount, shake_duration).Then() + .MoveToX(Position.X + shake_amount, shake_duration).Then() + .MoveToX(Position.X, shake_duration); } }