1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Allow DrawableHitObjects to be removed from a Playfield

(cherry picked from commit 3926238be9)
This commit is contained in:
Dean Herbert 2017-08-08 10:53:59 +09:00 committed by smoogipooo
parent ee7bb1b4f5
commit a95aa90adc
2 changed files with 13 additions and 0 deletions

View File

@ -82,6 +82,12 @@ namespace osu.Game.Rulesets.UI
/// <param name="h">The DrawableHitObject to add.</param>
public virtual void Add(DrawableHitObject<TObject, TJudgement> h) => HitObjects.Add(h);
/// <summary>
/// Remove a DrawableHitObject from this Playfield.
/// </summary>
/// <param name="h">The DrawableHitObject to remove.</param>
public virtual void Remove(DrawableHitObject<TObject, TJudgement> h) => HitObjects.Remove(h);
/// <summary>
/// Triggered when an object's Judgement is updated.
/// </summary>

View File

@ -211,6 +211,13 @@ namespace osu.Game.Rulesets.UI
queuedHitObjects.Enqueue(hitObject);
}
public override bool Remove(DrawableHitObject<TObject, TJudgement> hitObject)
{
foreach (var c in InternalChildren.OfType<SpeedAdjustmentContainer>())
c.Remove(hitObject);
return true;
}
protected override void Update()
{
base.Update();