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

Formatting

This commit is contained in:
Dean Herbert 2017-10-11 11:20:44 +09:00
parent 994959fd77
commit 1fc16693d6

View File

@ -12,6 +12,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public class SpinnerSpmCounter : Container public class SpinnerSpmCounter : Container
{ {
private readonly OsuSpriteText spmText; private readonly OsuSpriteText spmText;
public SpinnerSpmCounter() public SpinnerSpmCounter()
{ {
Children = new Drawable[] Children = new Drawable[]
@ -37,6 +38,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
} }
private double spm; private double spm;
public double SpinsPerMinute public double SpinsPerMinute
{ {
get { return spm; } get { return spm; }
@ -57,7 +59,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private readonly Queue<RotationRecord> records = new Queue<RotationRecord>(); private readonly Queue<RotationRecord> records = new Queue<RotationRecord>();
private const double spm_count_duration = 595; // not using hundreds to avoid frame rounding issues private const double spm_count_duration = 595; // not using hundreds to avoid frame rounding issues
public void SetRotation(float currentRotation) public void SetRotation(float currentRotation)
{ {
if (records.Count > 0) if (records.Count > 0)
@ -67,6 +68,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
record = records.Dequeue(); record = records.Dequeue();
SpinsPerMinute = (currentRotation - record.Rotation) / (Time.Current - record.Time) * 1000 * 60 / 360; SpinsPerMinute = (currentRotation - record.Rotation) / (Time.Current - record.Time) * 1000 * 60 / 360;
} }
records.Enqueue(new RotationRecord { Rotation = currentRotation, Time = Time.Current }); records.Enqueue(new RotationRecord { Rotation = currentRotation, Time = Time.Current });
} }
} }