mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +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;
|
||||
}
|
||||
|
||||
private readonly Dictionary<HitObject, HitObjectLifetimeEntry> lifetimeEntryMap = new Dictionary<HitObject, HitObjectLifetimeEntry>();
|
||||
|
||||
/// <summary>
|
||||
/// Adds a <see cref="HitObjectLifetimeEntry"/> for a pooled <see cref="HitObject"/> to this <see cref="Playfield"/>.
|
||||
/// </summary>
|
||||
@ -145,7 +143,6 @@ namespace osu.Game.Rulesets.UI
|
||||
public virtual void Add(HitObjectLifetimeEntry entry)
|
||||
{
|
||||
HitObjectContainer.Add(entry);
|
||||
lifetimeEntryMap[entry.HitObject] = entry;
|
||||
OnHitObjectAdded(entry.HitObject);
|
||||
}
|
||||
|
||||
@ -156,9 +153,8 @@ namespace osu.Game.Rulesets.UI
|
||||
/// <returns>Whether the <see cref="HitObject"/> was successfully removed.</returns>
|
||||
public virtual bool Remove(HitObjectLifetimeEntry entry)
|
||||
{
|
||||
if (lifetimeEntryMap.Remove(entry.HitObject))
|
||||
if (HitObjectContainer.Remove(entry))
|
||||
{
|
||||
HitObjectContainer.Remove(entry);
|
||||
OnHitObjectRemoved(entry.HitObject);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user