/// <summary> /// Loads all entities that match the systems signature into TargetEntities /// </summary> protected void GetEntitiesFromSignature(World world) { entsInSet = 0; foreach (int entity in world.Entities) { if (signature.EntityMatch(world, entity)) { if (entsInSet > entSet.Length) { Array.Resize(ref entSet, entSet.Length * 2); } entSet[entsInSet++] = new Entity(entity, world); } } }
public bool MatchesSignature(EntitySignature signature) => signature.EntityMatch(world, entity);
public bool EntityMatch(World world, int ent) => sig.EntityMatch(world, ent);