Make SpeedAdjustmentCollection support unordered adds of speed adjustments and hit objects.

This commit is contained in:
smoogipooo
2017-06-16 09:38:06 +09:00
parent fda220acbc
commit 03b2b254ba
4 changed files with 72 additions and 22 deletions

View File

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Lists;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
@ -25,6 +26,12 @@ namespace osu.Game.Rulesets.UI
{
}
[BackgroundDependencyLoader]
private void load()
{
ApplySpeedAdjustments();
}
protected override void ApplyBeatmap()
{
// Calculate default multiplier control points
@ -86,14 +93,9 @@ namespace osu.Game.Rulesets.UI
return new MultiplierControlPoint(time, DefaultControlPoints[index].DeepClone());
}
protected override void LoadObjects()
{
// We need to add speed adjustments before hit objects are loaded
ApplySpeedAdjustments();
base.LoadObjects();
}
/// <summary>
/// Applies speed changes to the playfield.
/// </summary>
protected abstract void ApplySpeedAdjustments();
}
}