// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Game.Beatmaps.ControlPoints { public abstract class ControlPoint : IComparable, IEquatable { /// /// The time at which the control point takes effect. /// public double Time; /// /// Whether this timing point was generated internally, as opposed to parsed from the underlying beatmap. /// internal bool AutoGenerated; public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time); /// /// Whether this control point is equivalent to another, ignoring time. /// /// Another control point to compare with. /// Whether equivalent. public abstract bool EquivalentTo(ControlPoint other); public bool Equals(ControlPoint other) => Time.Equals(other?.Time) && EquivalentTo(other); } }