1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 07:43:00 +08:00

Change rolling counters to use quicker easing types

This commit is contained in:
Dean Herbert 2024-01-17 18:18:53 +09:00
parent ee18123fc2
commit a66ddc7813
No known key found for this signature in database
13 changed files with 16 additions and 18 deletions

View File

@ -14,7 +14,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
public partial class PercentageCounter : RollingCounter<double>
{
protected override double RollingDuration => 750;
protected override double RollingDuration => 375;
private float epsilon => 1e-10f;

View File

@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface
/// <summary>
/// Easing for the counter rollover animation.
/// </summary>
protected virtual Easing RollingEasing => Easing.OutQuint;
protected virtual Easing RollingEasing => Easing.OutQuad;
private T displayedCount;

View File

@ -196,7 +196,7 @@ namespace osu.Game.Overlays.Mods
private partial class BPMDisplay : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;
protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0 BPM");

View File

@ -145,7 +145,7 @@ namespace osu.Game.Overlays.Mods
private partial class EffectCounter : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;
protected override LocalisableString FormatCount(double count) => ModUtils.FormatScoreMultiplier(count);

View File

@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Mods
private partial class EffectCounter : RollingCounter<double>
{
protected override double RollingDuration => 500;
protected override double RollingDuration => 250;
protected override LocalisableString FormatCount(double count) => count.ToLocalisableString("0.0#");

View File

@ -17,8 +17,7 @@ namespace osu.Game.Screens.Play.HUD
{
public partial class ArgonAccuracyCounter : GameplayAccuracyCounter, ISerialisableDrawable
{
protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;
[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)

View File

@ -21,8 +21,7 @@ namespace osu.Game.Screens.Play.HUD
{
private ArgonCounterTextComponent text = null!;
protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;
[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)

View File

@ -18,8 +18,7 @@ namespace osu.Game.Screens.Play.HUD
{
private ArgonScoreTextComponent scoreText = null!;
protected override double RollingDuration => 500;
protected override Easing RollingEasing => Easing.OutQuint;
protected override double RollingDuration => 250;
[SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play.HUD
{
public partial class BPMCounter : RollingCounter<double>, ISerialisableDrawable
{
protected override double RollingDuration => 750;
protected override double RollingDuration => 375;
[Resolved]
private IBindable<WorkingBeatmap> beatmap { get; set; } = null!;

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Play.HUD.ClicksPerSecond
[Resolved]
private ClicksPerSecondController controller { get; set; } = null!;
protected override double RollingDuration => 350;
protected override double RollingDuration => 175;
public bool UsesFixedAnchor { get; set; }

View File

@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.HUD
protected override bool IsRollingProportional => true;
protected override double RollingDuration => 1000;
protected override double RollingDuration => 500;
private const float alpha_when_invalid = 0.3f;

View File

@ -23,7 +23,7 @@ namespace osu.Game.Screens.Play.HUD
{
public bool UsesFixedAnchor { get; set; }
protected override double RollingDuration => 750;
protected override double RollingDuration => 375;
private const float alpha_when_invalid = 0.3f;
private readonly Bindable<bool> valid = new Bindable<bool>();

View File

@ -44,9 +44,10 @@ namespace osu.Game.Screens.Ranking.Expanded.Statistics
private partial class Counter : RollingCounter<double>
{
protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION;
protected override Easing RollingEasing => AccuracyCircle.ACCURACY_TRANSFORM_EASING;
// FormatAccuracy doesn't round, which means if we use the OutPow10 easing the number will stick 0.01% short for some time.
// To avoid that let's use a shorter easing which looks roughly the same.
protected override double RollingDuration => AccuracyCircle.ACCURACY_TRANSFORM_DURATION / 2;
protected override Easing RollingEasing => Easing.OutQuad;
protected override LocalisableString FormatCount(double count) => count.FormatAccuracy();