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:
parent
61c416dc16
commit
59e03fa528
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user