|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- using Svelto.ECS.Internal;
-
- namespace Svelto.ECS
- {
- public abstract class GenericEntityDescriptor<T>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
-
- public abstract class GenericEntityDescriptor<T, U>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- where U : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>(),
- new ComponentBuilder<U>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
-
- public abstract class GenericEntityDescriptor<T, U, V>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- where U : struct, _IInternalEntityComponent
- where V : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>(),
- new ComponentBuilder<U>(),
- new ComponentBuilder<V>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
-
- public abstract class GenericEntityDescriptor<T, U, V, W>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- where U : struct, _IInternalEntityComponent
- where V : struct, _IInternalEntityComponent
- where W : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>(),
- new ComponentBuilder<U>(),
- new ComponentBuilder<V>(),
- new ComponentBuilder<W>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
-
- public abstract class GenericEntityDescriptor<T, U, V, W, X>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- where U : struct, _IInternalEntityComponent
- where V : struct, _IInternalEntityComponent
- where W : struct, _IInternalEntityComponent
- where X : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>(),
- new ComponentBuilder<U>(),
- new ComponentBuilder<V>(),
- new ComponentBuilder<W>(),
- new ComponentBuilder<X>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
-
- public abstract class GenericEntityDescriptor<T, U, V, W, X, Y>: IEntityDescriptor
- where T : struct, _IInternalEntityComponent
- where U : struct, _IInternalEntityComponent
- where V : struct, _IInternalEntityComponent
- where W : struct, _IInternalEntityComponent
- where X : struct, _IInternalEntityComponent
- where Y : struct, _IInternalEntityComponent
- {
- static readonly IComponentBuilder[] _componentBuilders;
-
- static GenericEntityDescriptor()
- {
- _componentBuilders = new IComponentBuilder[]
- {
- new ComponentBuilder<T>(),
- new ComponentBuilder<U>(),
- new ComponentBuilder<V>(),
- new ComponentBuilder<W>(),
- new ComponentBuilder<X>(),
- new ComponentBuilder<Y>()
- };
- }
-
- public IComponentBuilder[] componentsToBuild => _componentBuilders;
- }
- }
|