mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Flip direction to avoid breaking other usages
This commit is contained in:
parent
7f8f41715d
commit
3b6619a360
@ -8,17 +8,27 @@ namespace osu.Game.Rulesets.Objects.Types
|
||||
/// <summary>
|
||||
/// A HitObject that ends at a different time than its start time.
|
||||
/// </summary>
|
||||
public interface IHasDuration
|
||||
#pragma warning disable 618
|
||||
public interface IHasDuration : IHasEndTime
|
||||
#pragma warning restore 618
|
||||
{
|
||||
double IHasEndTime.EndTime
|
||||
{
|
||||
get => EndTime;
|
||||
set => Duration = (Duration - EndTime) + value;
|
||||
}
|
||||
|
||||
double IHasEndTime.Duration => Duration;
|
||||
|
||||
/// <summary>
|
||||
/// The time at which the HitObject ends.
|
||||
/// </summary>
|
||||
double EndTime { get; }
|
||||
new double EndTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the HitObject.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
double Duration { get; set; }
|
||||
new double Duration { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,25 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Rulesets.Objects.Types
|
||||
{
|
||||
/// <summary>
|
||||
/// A HitObject that ends at a different time than its start time.
|
||||
/// </summary>
|
||||
[Obsolete("Use IHasDuration instead.")] // can be removed 20201126
|
||||
public interface IHasEndTime : IHasDuration
|
||||
public interface IHasEndTime
|
||||
{
|
||||
/// <summary>
|
||||
/// The time at which the HitObject ends.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
double EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The duration of the HitObject.
|
||||
/// </summary>
|
||||
double Duration { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user