1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 18:53:51 +08:00

Copy time between ControlPoints

This commit is contained in:
Dean Herbert 2021-09-10 14:35:53 +09:00
parent 1c3c32b724
commit 34f875187c

View File

@ -15,11 +15,9 @@ namespace osu.Game.Beatmaps.ControlPoints
/// The time at which the control point takes effect.
/// </summary>
[JsonIgnore]
public double Time => controlPointGroup?.Time ?? 0;
public double Time { get; set; }
private ControlPointGroup controlPointGroup;
public void AttachGroup(ControlPointGroup pointGroup) => controlPointGroup = pointGroup;
public void AttachGroup(ControlPointGroup pointGroup) => Time = pointGroup.Time;
public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time);
@ -46,6 +44,7 @@ namespace osu.Game.Beatmaps.ControlPoints
public virtual void CopyFrom(ControlPoint other)
{
Time = other.Time;
}
}
}