From fd1cbfd8fa851a0838e5dc82210347a0a312eaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adonais=20Romero=20Gonz=C3=A1lez?= Date: Sun, 9 Oct 2016 14:53:06 -0500 Subject: [PATCH] Hide VisibleCount from transformStar --- osu.Game/Graphics/UserInterface/StarCounter.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index dad3bbd05a..523527dcce 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -87,7 +87,7 @@ namespace osu.Game.Graphics.UserInterface protected override void transformCount(float currentValue, float newValue) { - transformStar((int)Math.Floor(currentValue), currentValue < newValue); + transformStar((int)Math.Floor(currentValue), currentValue, currentValue < newValue); transformCount(new TransformStarCounter(Clock), currentValue, newValue); } @@ -134,7 +134,7 @@ namespace osu.Game.Graphics.UserInterface } - protected void transformStar(int i, bool isIncrement) + protected void transformStar(int i, float value, bool isIncrement) { if (i >= MaxStars) return; @@ -147,11 +147,11 @@ namespace osu.Game.Graphics.UserInterface // If incrementing, animation should had started when VisibleCount crossed start of star (i) if (isIncrement) startTime -= i == (int)Math.Floor(prevCount) ? - getProportionalDuration(prevCount, VisibleCount) : getProportionalDuration(i, VisibleCount); + getProportionalDuration(prevCount, value) : getProportionalDuration(i, value); // If decrementing, animation should had started when VisibleCount crossed end of star (i + 1) else startTime -= i == (int)Math.Floor(prevCount) ? - getProportionalDuration(prevCount, VisibleCount) : getProportionalDuration(i + 1, VisibleCount); + getProportionalDuration(prevCount, value) : getProportionalDuration(i + 1, value); updateTransformStar(i); @@ -164,12 +164,12 @@ namespace osu.Game.Graphics.UserInterface // Detect increment that passes over an integer value if (Math.Ceiling(currentValue) <= Math.Floor(newValue)) for (int i = (int)Math.Ceiling(currentValue); i <= Math.Floor(newValue); i++) - transformStar(i, true); + transformStar(i, newValue, true); // Detect decrement that passes over an integer value if (Math.Floor(currentValue) >= Math.Ceiling(newValue)) for (int i = (int)Math.Floor(newValue); i < Math.Floor(currentValue); i++) - transformStar(i, false); + transformStar(i, newValue, false); } protected class TransformStarCounter : Transform