Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
680B

  1. using System;
  2. namespace Svelto.ECS
  3. {
  4. public interface IEntityDescriptor
  5. {
  6. IComponentBuilder[] componentsToBuild { get; }
  7. }
  8. public interface IDynamicEntityDescriptor: IEntityDescriptor
  9. {
  10. }
  11. static class EntityDescriptorTemplate<TType> where TType : IEntityDescriptor, new()
  12. {
  13. static EntityDescriptorTemplate()
  14. {
  15. realDescriptor = new TType();
  16. descriptor = realDescriptor;
  17. }
  18. public static TType realDescriptor { get; }
  19. public static Type type => typeof(TType);
  20. public static IEntityDescriptor descriptor { get; }
  21. }
  22. }