From 1fc16693d65c45cf5d84f2f478299a75b0b44ab4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 11 Oct 2017 11:20:44 +0900 Subject: [PATCH] Formatting --- .../Objects/Drawables/Pieces/SpinnerSpmCounter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerSpmCounter.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerSpmCounter.cs index 57ec516484..c079d3343b 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerSpmCounter.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerSpmCounter.cs @@ -12,6 +12,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces public class SpinnerSpmCounter : Container { private readonly OsuSpriteText spmText; + public SpinnerSpmCounter() { Children = new Drawable[] @@ -37,6 +38,7 @@ public SpinnerSpmCounter() } private double spm; + public double SpinsPerMinute { get { return spm; } @@ -57,7 +59,6 @@ private struct RotationRecord private readonly Queue records = new Queue(); private const double spm_count_duration = 595; // not using hundreds to avoid frame rounding issues - public void SetRotation(float currentRotation) { if (records.Count > 0) @@ -67,6 +68,7 @@ public void SetRotation(float currentRotation) record = records.Dequeue(); SpinsPerMinute = (currentRotation - record.Rotation) / (Time.Current - record.Time) * 1000 * 60 / 360; } + records.Enqueue(new RotationRecord { Rotation = currentRotation, Time = Time.Current }); } }