// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Game.Beatmaps.ControlPoints; namespace osu.Game.Rulesets.Timing { /// /// A control point which adds an aggregated multiplier based on the provided 's BeatLength and 's SpeedMultiplier. /// public class MultiplierControlPoint : IComparable { /// /// The time in milliseconds at which this starts. /// public double StartTime; /// /// The aggregate multiplier which this provides. /// public double Multiplier => Velocity * DifficultyPoint.SpeedMultiplier * BaseBeatLength / TimingPoint.BeatLength; /// /// The base beat length to scale the provided multiplier relative to. /// /// For a of 1000, a with a beat length of 500 will increase the multiplier by 2. public double BaseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH; /// /// The velocity multiplier. /// public double Velocity = 1; /// /// The that provides the timing information for this . /// public TimingControlPoint TimingPoint = new TimingControlPoint(); /// /// The that provides additional difficulty information for this . /// public DifficultyControlPoint DifficultyPoint = new DifficultyControlPoint(); /// /// Creates a . This is required for JSON serialization /// public MultiplierControlPoint() { } /// /// Creates a . /// /// The start time of this . public MultiplierControlPoint(double startTime) { StartTime = startTime; } // ReSharper disable once ImpureMethodCallOnReadonlyValueField public int CompareTo(MultiplierControlPoint other) => StartTime.CompareTo(other?.StartTime); } }