mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Update framework
This commit is contained in:
committed by
Dean Herbert
parent
39d20565aa
commit
9d523ea012
@ -33,25 +33,25 @@ namespace osu.Game.Graphics.UserInterface
|
||||
private const float star_size = 20;
|
||||
private const float star_spacing = 4;
|
||||
|
||||
private float count;
|
||||
private float countStars;
|
||||
|
||||
/// <summary>
|
||||
/// Amount of stars represented.
|
||||
/// </summary>
|
||||
public float Count
|
||||
public float CountStars
|
||||
{
|
||||
get
|
||||
{
|
||||
return count;
|
||||
return countStars;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (count == value) return;
|
||||
if (countStars == value) return;
|
||||
|
||||
if (IsLoaded)
|
||||
transformCount(value);
|
||||
count = value;
|
||||
countStars = value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,15 +94,15 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
public void ResetCount()
|
||||
{
|
||||
count = 0;
|
||||
countStars = 0;
|
||||
StopAnimation();
|
||||
}
|
||||
|
||||
public void ReplayAnimation()
|
||||
{
|
||||
var t = count;
|
||||
var t = countStars;
|
||||
ResetCount();
|
||||
Count = t;
|
||||
CountStars = t;
|
||||
}
|
||||
|
||||
public void StopAnimation()
|
||||
@ -111,8 +111,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
foreach (var star in stars.Children)
|
||||
{
|
||||
star.ClearTransforms(true);
|
||||
star.FadeTo(i < count ? 1.0f : minStarAlpha);
|
||||
star.Icon.ScaleTo(getStarScale(i, count));
|
||||
star.FadeTo(i < countStars ? 1.0f : minStarAlpha);
|
||||
star.Icon.ScaleTo(getStarScale(i, countStars));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
star.ClearTransforms(true);
|
||||
|
||||
var delay = (count <= newValue ? Math.Max(i - count, 0) : Math.Max(count - 1 - i, 0)) * animationDelay;
|
||||
var delay = (countStars <= newValue ? Math.Max(i - countStars, 0) : Math.Max(countStars - 1 - i, 0)) * animationDelay;
|
||||
|
||||
using (BeginDelayedSequence(delay, true))
|
||||
{
|
||||
|
Reference in New Issue
Block a user