mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 12:42:54 +08:00
Add RemoveSpeedAdjustment
This commit is contained in:
parent
4fc77be624
commit
c3cfad4eb5
@ -200,6 +200,25 @@ namespace osu.Game.Rulesets.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes a <see cref="SpeedAdjustmentContainer"/> from this container, re-sorting all hit objects
|
||||||
|
/// which it contained into new <see cref="SpeedAdjustmentContainer"/>s.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="speedAdjustment">The <see cref="SpeedAdjustmentContainer"/> to remove.</param>
|
||||||
|
public void RemoveSpeedAdjustment(SpeedAdjustmentContainer speedAdjustment)
|
||||||
|
{
|
||||||
|
if (!speedAdjustments.Remove(speedAdjustment))
|
||||||
|
return;
|
||||||
|
|
||||||
|
while (speedAdjustment.Count > 0)
|
||||||
|
{
|
||||||
|
DrawableHitObject hitObject = speedAdjustment[0];
|
||||||
|
|
||||||
|
speedAdjustment.Remove(hitObject);
|
||||||
|
Add(hitObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override IEnumerable<DrawableHitObject> Objects => speedAdjustments.SelectMany(s => s.Children);
|
public override IEnumerable<DrawableHitObject> Objects => speedAdjustments.SelectMany(s => s.Children);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user