1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Add Shake Transformation

This commit is contained in:
tgi74000 2018-06-28 13:39:49 +02:00
parent e4d494fb15
commit a0b67f4059

View File

@ -13,6 +13,8 @@ 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
{
@ -229,6 +231,16 @@ 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