mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Default CreateSpeedAdjustmentContainer implementation.
This commit is contained in:
parent
c6447e40f9
commit
068dfcb19a
@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Timing
|
||||
/// Creates a new <see cref="SpeedAdjustmentContainer"/>.
|
||||
/// </summary>
|
||||
/// <param name="controlPoint">The <see cref="MultiplierControlPoint"/> which provides the speed adjustments for this container.</param>
|
||||
protected SpeedAdjustmentContainer(MultiplierControlPoint controlPoint)
|
||||
public SpeedAdjustmentContainer(MultiplierControlPoint controlPoint)
|
||||
{
|
||||
ControlPoint = controlPoint;
|
||||
|
||||
|
@ -86,6 +86,9 @@ namespace osu.Game.Rulesets.UI
|
||||
.GroupBy(s => s.TimingPoint.BeatLength * s.DifficultyPoint.SpeedMultiplier).Select(g => g.First());
|
||||
|
||||
DefaultControlPoints.AddRange(timingChanges);
|
||||
|
||||
if (DefaultControlPoints.Count == 0)
|
||||
DefaultControlPoints.Add(new MultiplierControlPoint());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -105,6 +108,6 @@ namespace osu.Game.Rulesets.UI
|
||||
return new MultiplierControlPoint(time, DefaultControlPoints[index].DeepClone());
|
||||
}
|
||||
|
||||
protected abstract SpeedAdjustmentContainer CreateSpeedAdjustmentContainer(MultiplierControlPoint controlPoint);
|
||||
protected virtual SpeedAdjustmentContainer CreateSpeedAdjustmentContainer(MultiplierControlPoint controlPoint) => new SpeedAdjustmentContainer(controlPoint);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user