2021-12-21 18:08:31 +08:00
|
|
|
|
// 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.
|
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2022-01-17 18:28:17 +08:00
|
|
|
|
using System.Collections.Generic;
|
2021-12-21 18:08:31 +08:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Difficulty
|
|
|
|
|
{
|
|
|
|
|
public class PerformanceAttributes
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calculated score performance points.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty("pp")]
|
|
|
|
|
public double Total { get; set; }
|
2022-01-17 18:28:17 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Return a <see cref="PerformanceDisplayAttribute"/> for each attribute so that a performance breakdown can be displayed.
|
2022-01-17 20:36:36 +08:00
|
|
|
|
/// Some attributes may be omitted if they are not meant for display.
|
2022-01-17 18:28:17 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public virtual IEnumerable<PerformanceDisplayAttribute> GetAttributesForDisplay()
|
|
|
|
|
{
|
2022-02-01 22:26:55 +08:00
|
|
|
|
yield return new PerformanceDisplayAttribute(nameof(Total), "Achieved PP", Total);
|
2022-01-17 18:28:17 +08:00
|
|
|
|
}
|
2021-12-21 18:08:31 +08:00
|
|
|
|
}
|
|
|
|
|
}
|