mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 04:53:12 +08:00
Remove unnecessary dictionary for now
This commit is contained in:
parent
35329aa976
commit
a07d4a7915
@ -136,8 +136,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Dictionary<HitObject, HitObjectLifetimeEntry> lifetimeEntryMap = new Dictionary<HitObject, HitObjectLifetimeEntry>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a <see cref="HitObjectLifetimeEntry"/> for a pooled <see cref="HitObject"/> to this <see cref="Playfield"/>.
|
/// Adds a <see cref="HitObjectLifetimeEntry"/> for a pooled <see cref="HitObject"/> to this <see cref="Playfield"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -145,7 +143,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
public virtual void Add(HitObjectLifetimeEntry entry)
|
public virtual void Add(HitObjectLifetimeEntry entry)
|
||||||
{
|
{
|
||||||
HitObjectContainer.Add(entry);
|
HitObjectContainer.Add(entry);
|
||||||
lifetimeEntryMap[entry.HitObject] = entry;
|
|
||||||
OnHitObjectAdded(entry.HitObject);
|
OnHitObjectAdded(entry.HitObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,9 +153,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// <returns>Whether the <see cref="HitObject"/> was successfully removed.</returns>
|
/// <returns>Whether the <see cref="HitObject"/> was successfully removed.</returns>
|
||||||
public virtual bool Remove(HitObjectLifetimeEntry entry)
|
public virtual bool Remove(HitObjectLifetimeEntry entry)
|
||||||
{
|
{
|
||||||
if (lifetimeEntryMap.Remove(entry.HitObject))
|
if (HitObjectContainer.Remove(entry))
|
||||||
{
|
{
|
||||||
HitObjectContainer.Remove(entry);
|
|
||||||
OnHitObjectRemoved(entry.HitObject);
|
OnHitObjectRemoved(entry.HitObject);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user