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:
parent
04f3802cc0
commit
40a27c810a
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user