1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 04:27:52 +08:00
osu-lazer/osu.Game/Screens/Play/HUD/ILeaderboardScore.cs
Dean Herbert 1a6d9e9ff0 Apply NRT to GameplayLeaderboardScore and change GetDisplayedScore handling
I don't feel too confident with the default scoring function being
assigned in the constructor to a publicly settable delegate. This just
feels a bit more elegant, and handles the (likely-never-used) case where
we need to restore the default function.

An alternative would be to provide the function as a `ctor` argument,
but I believe that wasn't done here to allow using the
`ILeaderboardScore` interface.
2023-05-29 20:00:29 +09:00

32 lines
1.0 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play.HUD
{
public interface ILeaderboardScore
{
BindableLong TotalScore { get; }
BindableDouble Accuracy { get; }
BindableInt Combo { get; }
BindableBool HasQuit { get; }
/// <summary>
/// An optional value to guarantee stable ordering.
/// Lower numbers will appear higher in cases of <see cref="TotalScore"/> ties.
/// </summary>
Bindable<long> DisplayOrder { get; }
/// <summary>
/// A custom function which handles converting a score to a display score using a provide <see cref="ScoringMode"/>.
/// </summary>
/// <remarks>
/// If no function is provided, <see cref="TotalScore"/> will be used verbatim.</remarks>
Func<ScoringMode, long> GetDisplayScore { set; }
}
}