protected EntityGroup <TEntity> CreateGroup(string name, EntityMatcher <TEntity> matcher)
        {
            var group = new EntityGroup <TEntity>(name, matcher, this);

            foreach (var id in matcher.GetAllIds())
            {
                (_groupsByComponentId[id] ?? (_groupsByComponentId[id] = new List <EntityGroup <TEntity> >()))
                .Add(group);
            }

            return(group);
        }
Beispiel #2
0
 public EntityGroup(string name, EntityMatcher <TEntity> matcher, EntityManager <TEntity> manager)
 {
     Name     = name;
     Matcher  = matcher;
     _manager = manager;
 }