Ejemplo n.º 1
0
        public EntityLoader(IEntityRegistery registery)
        {
            _options = new JsonSerializerOptions();
            _options.Converters.Add(new JsonStringEnumConverter());
            _options.Converters.Add(new VectorConverter());

            var type = typeof(IComponent);

            _cachedTypes = AppDomain.CurrentDomain.GetAssemblies()
                           .SelectMany(s => s.GetTypes())
                           .Where(p => type.IsAssignableFrom(p))
                           .ToDictionary(x => x.Name.Replace("Component", string.Empty), y => y);
            _registery = registery;
        }
Ejemplo n.º 2
0
 internal EntityRecord(string name, IEntityRegistery registry)
 {
     Name      = name;
     Registery = registry;
 }