public static EntityComponentsMask Build(params EntityComponentType[] componentTypes) { EntityComponentsMask result = 0; foreach (var componentType in componentTypes) { result = result.Or(componentType); } return(result); }
public static EntityComponentsMask Or(this EntityComponentsMask mask, EntityComponentType type) { return(mask | (EntityComponentsMask)(1 << (int)type)); }
public static bool Contains(this EntityComponentsMask mask, EntityComponentsMask other) { return((mask & other) == other); }
protected EntitySystemService(EntityService entityService, EntityComponentsMask requiredComponentsMask) { EntityService = entityService; RequiredComponentsMask = requiredComponentsMask; }