public Bag <Entity> GetEntities(Aspect aspect) { var entitiesBag = new Bag <Entity>(); for (int index = 0; index < ActiveEntities.Count; ++index) { var entity = ActiveEntities.Get(index); if (entity != null && aspect.Interests(entity)) { entitiesBag.Add(entity); } } return(entitiesBag); }
public bool IsActive(int entityId) { return(ActiveEntities.Get(entityId) != null); }
public Entity GetEntity(int entityId) { Debug.Assert(entityId >= 0, "Id must be at least 0."); return(ActiveEntities.Get(entityId)); }