Exemple #1
0
        // TODO: Make a FilterCollection or something that does all this so systems can have multiple filters running.
        private void OnComponentAdded(int entity, IEcsComponent component)
        {
            if (!entities.Contains(entity) && world.MatchesComponentFilter <TComponentFilter>(entity))
            {
                TComponentFilter filter = world.CreateComponentFilter <TComponentFilter>(entity);
                filters.Add(filter);
                entities.Add(entity);

                Console.WriteLine(GetType().Name + " will process " + entity);
            }
        }