1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Allow DrawableHitObjects to be removed from a Playfield

This commit is contained in:
Dean Herbert 2017-08-08 10:53:59 +09:00
parent 4bdaa8ae68
commit 3926238be9
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

@ -204,6 +204,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();