Exemple #1
0
 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());
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public BlackboardDataQuery([NotNull] ComponentTypeSet set, Func <IEnumerable <ComponentType>, EntityQuery> createEntityQuery)
 {
     Set   = set;
     Query = createEntityQuery(Set);
 }