public static bool Matches(EntityGroups groups1, EntityGroups groups2, EntityMatches match = EntityMatches.All) { bool matches = false; switch (match) { case EntityMatches.All: matches = groups1.HasAll(groups2); break; case EntityMatches.Any: matches = groups1.HasAny(groups2); break; case EntityMatches.None: matches = groups1.HasNone(groups2); break; case EntityMatches.Exact: matches = groups1 == groups2; break; } return(matches); }
public IEntity CreateEntity(EntityGroups groups, bool active) { Assert.IsNotNull(groups); var entity = entityPool.Create(); entity.Initialize(this, messageManager, groups, active); AddEntity(entity); return(entity); }
public IEntity CreateEntity(EntityGroups groups) { return(CreateEntity(groups, true)); }
public EntityMatch(EntityGroups groups, EntityMatches match = EntityMatches.All) { this.groups = groups; this.match = match; }