1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:52:55 +08:00

Move shake duration to a constant

This commit is contained in:
tgi74000 2018-06-29 10:36:00 +02:00
parent e3317b5145
commit 3d50050089

View File

@ -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);
}
}