public bool Equals(ComponentTypeSet other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (_types.Count != other._types.Count) { return(false); } return(!_types.Except(other._types, new ComponentTypeComparer()).Any()); }
public BlackboardDataQuery(ComponentTypeSet set, Func <IEnumerable <ComponentType>, EntityQuery> createEntityQuery) { Set = set; QueryJob = createEntityQuery(Set .Append(ComponentType.ReadOnly <BlackboardDataQuery>()) .Append(ComponentType.ReadOnly <NodeBlobRef>()) .Append(ComponentType.Exclude <RunOnMainThreadTag>()) .Append(ComponentType.Exclude <ForceRunOnMainThreadTag>()) ); QueryMainThread = createEntityQuery(Set .Append(ComponentType.ReadOnly <BlackboardDataQuery>()) .Append(ComponentType.ReadOnly <NodeBlobRef>()) .Append(ComponentType.ReadOnly <RunOnMainThreadTag>()) .Append(ComponentType.Exclude <ForceRunOnJobTag>()) ); QueryJob.SetSharedComponentFilter(this); QueryMainThread.SetSharedComponentFilter(this); }
public BlackboardDataQuery([NotNull] ComponentTypeSet set, Func <IEnumerable <ComponentType>, EntityQuery> createEntityQuery) { Set = set; Query = createEntityQuery(Set); }