mirror of
https://github.com/ppy/osu
synced 2025-01-19 04:20:59 +00:00
Make ScrollingPlayfield store a list of SpeedAdjustments instead of a Container.
Because they're removed from the container when they're not alive, and any further adding methods fail.
This commit is contained in:
parent
dfb47b571a
commit
1c5584f068
@ -168,7 +168,7 @@ namespace osu.Game.Rulesets.UI
|
||||
/// Hit objects that are to be re-processed on the next update.
|
||||
/// </summary>
|
||||
private readonly List<DrawableHitObject> queuedHitObjects = new List<DrawableHitObject>();
|
||||
private readonly Container<SpeedAdjustmentContainer> speedAdjustments;
|
||||
private readonly List<SpeedAdjustmentContainer> speedAdjustments = new List<SpeedAdjustmentContainer>();
|
||||
|
||||
private readonly Axes scrollingAxes;
|
||||
|
||||
@ -179,8 +179,6 @@ namespace osu.Game.Rulesets.UI
|
||||
public ScrollingHitObjectContainer(Axes scrollingAxes)
|
||||
{
|
||||
this.scrollingAxes = scrollingAxes;
|
||||
|
||||
AddInternal(speedAdjustments = new Container<SpeedAdjustmentContainer> { RelativeSizeAxes = Axes.Both });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -193,6 +191,8 @@ namespace osu.Game.Rulesets.UI
|
||||
speedAdjustment.ScrollingAxes = scrollingAxes;
|
||||
speedAdjustment.Reversed = Reversed;
|
||||
speedAdjustments.Add(speedAdjustment);
|
||||
|
||||
AddInternal(speedAdjustment);
|
||||
}
|
||||
|
||||
public override IEnumerable<DrawableHitObject> Objects => speedAdjustments.SelectMany(s => s.Children);
|
||||
|
Loading…
Reference in New Issue
Block a user