1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00

Update visuals of spinner implementations to show MAX score differently

This commit is contained in:
Dean Herbert 2023-10-20 16:11:09 +09:00
parent 181a98e8ef
commit ca3a3f600e
No known key found for this signature in database
3 changed files with 52 additions and 9 deletions

View File

@ -85,11 +85,25 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
base.LoadComplete();
completedSpins = drawableSpinner.CompletedFullSpins.GetBoundCopy();
completedSpins.BindValueChanged(bonus =>
completedSpins.BindValueChanged(_ =>
{
if (drawableSpinner.CurrentBonusScore <= 0)
return;
if (drawableSpinner.CurrentBonusScore == drawableSpinner.MaximumBonusScore)
{
bonusCounter.Text = "MAX";
bonusCounter.ScaleTo(1.5f).Then().ScaleTo(2.8f, 1000, Easing.OutQuint);
bonusCounter.FlashColour(Colour4.FromHex("FC618F"), 400);
bonusCounter.FadeOutFromOne(500);
}
else
{
bonusCounter.Text = drawableSpinner.CurrentBonusScore.ToString(NumberFormatInfo.InvariantInfo);
bonusCounter.FadeOutFromOne(1500);
bonusCounter.ScaleTo(1.5f).Then().ScaleTo(1f, 1000, Easing.OutQuint);
bonusCounter.FadeOutFromOne(1500);
}
});
spinsPerMinute = drawableSpinner.SpinsPerMinute.GetBoundCopy();

View File

@ -24,6 +24,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
private Container spmContainer = null!;
private OsuSpriteText spmCounter = null!;
[Resolved]
private OsuColour colours { get; set; } = null!;
public DefaultSpinner()
{
RelativeSizeAxes = Axes.Both;
@ -89,10 +92,24 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
completedSpins = drawableSpinner.CompletedFullSpins.GetBoundCopy();
completedSpins.BindValueChanged(bonus =>
{
if (drawableSpinner.CurrentBonusScore <= 0)
return;
if (drawableSpinner.CurrentBonusScore == drawableSpinner.MaximumBonusScore)
{
bonusCounter.Text = "MAX";
bonusCounter.ScaleTo(1.5f).Then().ScaleTo(2.8f, 1000, Easing.OutQuint);
bonusCounter.FlashColour(colours.YellowLight, 400);
bonusCounter.FadeOutFromOne(500);
}
else
{
bonusCounter.Text = drawableSpinner.CurrentBonusScore.ToString(NumberFormatInfo.InvariantInfo);
bonusCounter.FadeOutFromOne(1500);
bonusCounter.ScaleTo(1.5f).Then().ScaleTo(1f, 1000, Easing.OutQuint);
}
});
spinsPerMinute = drawableSpinner.SpinsPerMinute.GetBoundCopy();

View File

@ -119,9 +119,21 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
completedSpins = DrawableSpinner.CompletedFullSpins.GetBoundCopy();
completedSpins.BindValueChanged(bonus =>
{
if (DrawableSpinner.CurrentBonusScore <= 0)
return;
bonusCounter.Text = DrawableSpinner.CurrentBonusScore.ToString(NumberFormatInfo.InvariantInfo);
if (DrawableSpinner.CurrentBonusScore == DrawableSpinner.MaximumBonusScore)
{
bonusCounter.ScaleTo(1.4f).Then().ScaleTo(1.8f, 1000, Easing.Out);
bonusCounter.FadeOutFromOne(500, Easing.Out);
}
else
{
bonusCounter.FadeOutFromOne(800, Easing.Out);
bonusCounter.ScaleTo(SPRITE_SCALE * 2f).Then().ScaleTo(SPRITE_SCALE * 1.28f, 800, Easing.Out);
}
});
spinsPerMinute = DrawableSpinner.SpinsPerMinute.GetBoundCopy();