コード例 #1
0
        /// <summary>
        /// Loads all entities that match the systems signature into TargetEntities
        /// </summary>
        protected void GetEntitiesFromSignature(World world)
        {
            entsInSet = 0;
            foreach (int entity in world.Entities)
            {
                if (signature.EntityMatch(world, entity))
                {
                    if (entsInSet > entSet.Length)
                    {
                        Array.Resize(ref entSet, entSet.Length * 2);
                    }

                    entSet[entsInSet++] = new Entity(entity, world);
                }
            }
        }
コード例 #2
0
 public bool MatchesSignature(EntitySignature signature) => signature.EntityMatch(world, entity);
コード例 #3
0
 public bool EntityMatch(World world, int ent) => sig.EntityMatch(world, ent);