Exemplo n.º 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());
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 public BlackboardDataQuery([NotNull] ComponentTypeSet set, Func <IEnumerable <ComponentType>, EntityQuery> createEntityQuery)
 {
     Set   = set;
     Query = createEntityQuery(Set);
 }