Formatting

This commit is contained in:
Dean Herbert 2017-10-11 11:20:44 +09:00
parent 994959fd77
commit 1fc16693d6
1 changed files with 3 additions and 1 deletions

View File

@ -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<RotationRecord> records = new Queue<RotationRecord>();
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 });
}
}