1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Calculate SPM in spinner disc.

This commit is contained in:
Huo Yaoyuan 2017-09-29 19:24:14 +08:00
parent 04f3802cc0
commit 40a27c810a

View File

@ -76,7 +76,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private float lastAngle;
private float currentRotation;
private double lastTime;
public float RotationAbsolute;
public double SpinsPerMinute;
private int completeTick;
@ -107,9 +109,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
currentRotation += thisAngle - lastAngle;
RotationAbsolute += Math.Abs(thisAngle - lastAngle);
SpinsPerMinute = (thisAngle - lastAngle) / (Time.Current - lastTime) * 1000 * 60 / 360;
}
lastAngle = thisAngle;
lastTime = Time.Current;
if (Complete && updateCompleteTick())
{