2021-10-01 19:56:03 +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
|
|
|
|
|
2021-10-01 19:56:03 +08:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Difficulty
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Wraps a <see cref="DifficultyAttributes"/> object and adds a time value for which the attribute is valid.
|
2021-11-08 13:43:46 +08:00
|
|
|
/// Output by DifficultyCalculator.CalculateTimed methods.
|
2021-10-01 19:56:03 +08:00
|
|
|
/// </summary>
|
|
|
|
public class TimedDifficultyAttributes : IComparable<TimedDifficultyAttributes>
|
|
|
|
{
|
2021-11-02 16:17:14 +08:00
|
|
|
/// <summary>
|
2021-11-02 16:18:02 +08:00
|
|
|
/// The non-clock-adjusted time value at which the attributes take effect.
|
2021-11-02 16:17:14 +08:00
|
|
|
/// </summary>
|
2021-10-01 19:56:03 +08:00
|
|
|
public readonly double Time;
|
2021-11-02 16:17:14 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The attributes.
|
|
|
|
/// </summary>
|
2021-10-01 19:56:03 +08:00
|
|
|
public readonly DifficultyAttributes Attributes;
|
|
|
|
|
2021-11-02 16:19:14 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Creates new <see cref="TimedDifficultyAttributes"/>.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="time">The non-clock-adjusted time value at which the attributes take effect.</param>
|
|
|
|
/// <param name="attributes">The attributes.</param>
|
2021-10-01 19:56:03 +08:00
|
|
|
public TimedDifficultyAttributes(double time, DifficultyAttributes attributes)
|
|
|
|
{
|
|
|
|
Time = time;
|
|
|
|
Attributes = attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int CompareTo(TimedDifficultyAttributes other) => Time.CompareTo(other.Time);
|
|
|
|
}
|
|
|
|
}
|