MoonTools.ECS/src/Filter.cs

16 lines
398 B
C#
Raw Normal View History

2022-03-06 06:12:27 +00:00
namespace MoonTools.ECS;
public class Filter
{
internal FilterSignature Signature;
private ComponentDepot ComponentDepot;
internal Filter(ComponentDepot componentDepot, HashSet<Type> included, HashSet<Type> excluded)
{
ComponentDepot = componentDepot;
Signature = new FilterSignature(included, excluded);
}
public IEnumerable<Entity> Entities => ComponentDepot.FilterEntities(this);
}