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

Move Shake to DrawableOsuHitObject, Clean up Shake()

This commit is contained in:
tgi74000 2018-06-28 15:33:59 +02:00
parent 61c416dc16
commit 59e03fa528
2 changed files with 12 additions and 12 deletions

View File

@ -58,6 +58,18 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private OsuInputManager osuActionInputManager;
internal OsuInputManager OsuActionInputManager => osuActionInputManager ?? (osuActionInputManager = GetContainingInputManager() as OsuInputManager);
public void Shake()
{
const int shake_amount = 8;
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);
}
}
public enum ComboResult

View File

@ -13,8 +13,6 @@ using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
using OpenTK.Graphics;
using osu.Framework.Graphics;
using OpenTK;
namespace osu.Game.Rulesets.Objects.Drawables
{
@ -231,16 +229,6 @@ namespace osu.Game.Rulesets.Objects.Drawables
protected virtual void CheckForJudgements(bool userTriggered, double timeOffset)
{
}
public void Shake()
{
this.MoveToOffset(new Vector2(8, 0), 20).Delay(20)
.MoveToOffset(-new Vector2(16, 0), 20).Delay(20)
.MoveToOffset(new Vector2(16, 0), 20).Delay(20)
.MoveToOffset(-new Vector2(16, 0), 20).Delay(20)
.MoveToOffset(new Vector2(16, 0), 20).Delay(20)
.MoveToOffset(-new Vector2(8, 0), 20);
}
}
public abstract class DrawableHitObject<TObject> : DrawableHitObject