mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Add xmldoc and nullability annotations
This commit is contained in:
@ -317,11 +317,27 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public readonly struct StarDifficulty
|
||||
{
|
||||
/// <summary>
|
||||
/// The star difficulty rating for the given beatmap.
|
||||
/// </summary>
|
||||
public readonly double Stars;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum combo achievable on the given beatmap.
|
||||
/// </summary>
|
||||
public readonly int MaxCombo;
|
||||
|
||||
/// <summary>
|
||||
/// The difficulty attributes computed for the given beatmap.
|
||||
/// Might not be available if the star difficulty is associated with a beatmap that's not locally available.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
public readonly DifficultyAttributes Attributes;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="StarDifficulty"/> structure based on <see cref="DifficultyAttributes"/> computed
|
||||
/// by a <see cref="DifficultyCalculator"/>.
|
||||
/// </summary>
|
||||
public StarDifficulty([NotNull] DifficultyAttributes attributes)
|
||||
{
|
||||
Stars = attributes.StarRating;
|
||||
@ -330,6 +346,10 @@ namespace osu.Game.Beatmaps
|
||||
// Todo: Add more members (BeatmapInfo.DifficultyRating? Attributes? Etc...)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="StarDifficulty"/> structure with a pre-populated star difficulty and max combo
|
||||
/// in scenarios where computing <see cref="DifficultyAttributes"/> is not feasible (i.e. when working with online sources).
|
||||
/// </summary>
|
||||
public StarDifficulty(double starDifficulty, int maxCombo)
|
||||
{
|
||||
Stars = starDifficulty;
|
||||
|
Reference in New Issue
Block a user