// 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 { /// /// The time at which the control point takes effect. /// public double Time => controlPointGroup?.Time ?? 0; private ControlPointGroup controlPointGroup; public void AttachGroup(ControlPointGroup pointGroup) => controlPointGroup = pointGroup; public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time); /// /// Determines whether this results in a meaningful change when placed alongside another. /// /// An existing control point to compare with. /// Whether this is redundant when placed alongside . public abstract bool IsRedundant(ControlPoint existing); } }