1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Add droplet rotation animation

This commit is contained in:
Dean Herbert 2020-02-19 17:55:40 +09:00
parent e1140d7c91
commit 7b27f6b378

View File

@ -2,6 +2,8 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Utils;
using osu.Game.Rulesets.Catch.Objects.Drawable.Pieces;
using osu.Game.Skinning;
using osuTK.Graphics;
@ -27,5 +29,16 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
AccentColour = { Value = Color4.White }
});
}
protected override void UpdateInitialTransforms()
{
base.UpdateInitialTransforms();
// roughly matches osu-stable
float startRotation = RNG.NextSingle() * 20;
double duration = HitObject.TimePreempt + 2000;
this.RotateTo(startRotation).RotateTo(startRotation + 720, duration);
}
}
}