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:
parent
ee7bb1b4f5
commit
a95aa90adc
@ -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>
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user