コード例 #1
0
        /// <summary>
        /// Makes a new set and registers it for updating membership later.
        /// </summary>
        /// <returns>An enumerable list of entitySet, that will update automatically.</returns>
        public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
        {
            var entitySet = new EntitySet(predicate);

            _entitySets.Add(entitySet);
            foreach (var entity in _entities)
            {
                if (!entitySet.Matches(entity))
                {
                    continue;
                }
                entitySet.Add(entity);
            }
            return(entitySet);
        }
コード例 #2
0
ファイル: Context.cs プロジェクト: Hengle/ECSLight
 /// <summary>
 /// Returns all entities that match the predicate.
 /// </summary>
 /// <returns>An enumerable list of entities, that will update automatically.</returns>
 public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
 {
     return(_setManager.CreateSet(predicate));
 }
コード例 #3
0
ファイル: StubSetManager.cs プロジェクト: Hengle/ECSLight
 public EntitySet CreateSet(EntitySet.IncludeInSet predicate)
 {
     return(new EntitySet(e => false));
 }