Smooth spm values into a time range.

This commit is contained in:
Huo Yaoyuan
2017-09-30 15:23:10 +08:00
parent e2e26c91af
commit 3de42ee405
2 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -187,7 +188,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
circle.Rotation = disc.Rotation;
ticks.Rotation = disc.Rotation;
spmText.Text = disc.SpinsPerMinute.ToString(@"#0");
spmText.Text = Math.Truncate(disc.SpinsPerMinute).ToString(@"#0");
float relativeCircleScale = spinner.Scale * circle.DrawHeight / mainContainer.DrawHeight;
disc.ScaleTo(relativeCircleScale + (1 - relativeCircleScale) * Progress, 200, Easing.OutQuint);