32 lines
687 B
C#
32 lines
687 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Encompass
|
|
{
|
|
internal class EntityTracker
|
|
{
|
|
private readonly HashSet<Guid> trackedEntityIDs = new HashSet<Guid>();
|
|
|
|
public IEnumerable<Guid> TrackedEntityIDs
|
|
{
|
|
get { return trackedEntityIDs; }
|
|
}
|
|
|
|
public void TrackEntity(Guid entityID)
|
|
{
|
|
trackedEntityIDs.Add(entityID);
|
|
}
|
|
|
|
public void UntrackEntity(Guid entityID)
|
|
{
|
|
trackedEntityIDs.Remove(entityID);
|
|
}
|
|
|
|
public bool IsTracking(Guid entityID)
|
|
{
|
|
return trackedEntityIDs.Contains(entityID);
|
|
}
|
|
}
|
|
}
|