Exemplo n.º 1
0
        public void ReleaseNodes <T>(AntNodeList <T> aNodes)
        {
            var type = typeof(T);

            if (_families.ContainsKey(type))
            {
                _families.Remove(type);
            }
        }
Exemplo n.º 2
0
        public AntFamily(AntNodePool <T> aPool = null)
        {
            _nodes    = new AntNodeList <T>();
            _entities = new Dictionary <AntEntity, T>();
            _pool     = (aPool != null) ? aPool : new AntNodePool <T>();

            var type = typeof(T);

            _components = type.GetProperties().ToDictionary(propInfo => propInfo.PropertyType, propInfo => propInfo);
        }