mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 09:07:25 +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>
|
/// <param name="h">The DrawableHitObject to add.</param>
|
||||||
public virtual void Add(DrawableHitObject<TObject, TJudgement> h) => HitObjects.Add(h);
|
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>
|
/// <summary>
|
||||||
/// Triggered when an object's Judgement is updated.
|
/// Triggered when an object's Judgement is updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -211,6 +211,13 @@ namespace osu.Game.Rulesets.UI
|
|||||||
queuedHitObjects.Enqueue(hitObject);
|
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()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
Loading…
Reference in New Issue
Block a user