|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using System.Runtime.InteropServices;
-
- namespace Svelto.ECS
- {
- public class GenericEntityDescriptor<T>:IEntityDescriptor where T : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] { new EntityViewBuilder<T>() };
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
-
- }
-
- public class GenericEntityDescriptor<T, U> : IEntityDescriptor where T : EntityView, new()
- where U : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] {new EntityViewBuilder<T>(), new EntityViewBuilder<U>()};
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
- }
-
- public class GenericEntityDescriptor<T, U, V> : IEntityDescriptor where T : EntityView, new()
- where U : EntityView, new()
- where V : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] {new EntityViewBuilder<T>(), new EntityViewBuilder<U>(), new EntityViewBuilder<V>()};
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
- }
-
- public class GenericEntityDescriptor<T, U, V, W> : IEntityDescriptor where T : EntityView, new()
- where U : EntityView, new()
- where V : EntityView, new()
- where W : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] {new EntityViewBuilder<T>(), new EntityViewBuilder<U>(), new EntityViewBuilder<V>(), new EntityViewBuilder<W>()};
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
- }
-
- public class GenericEntityDescriptor<T, U, V, W, X> : IEntityDescriptor where T : EntityView, new()
- where U : EntityView, new()
- where V : EntityView, new()
- where W : EntityView, new()
- where X : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] {new EntityViewBuilder<T>(), new EntityViewBuilder<U>(), new EntityViewBuilder<V>(), new EntityViewBuilder<W>(), new EntityViewBuilder<X>()};
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
- }
-
- public class GenericEntityDescriptor<T, U, V, W, X, Y> : IEntityDescriptor where T : EntityView, new()
- where U : EntityView, new()
- where V : EntityView, new()
- where W : EntityView, new()
- where X : EntityView, new()
- where Y : EntityView, new()
- {
- static GenericEntityDescriptor()
- {
- entityViewBuilders = new IEntityViewBuilder[] {new EntityViewBuilder<T>(), new EntityViewBuilder<U>(), new EntityViewBuilder<V>(), new EntityViewBuilder<W>(), new EntityViewBuilder<X>(), new EntityViewBuilder<Y>()};
- }
-
- public IEntityViewBuilder[] entityViewsToBuild
- {
- get { return entityViewBuilders; }
- }
-
- public static readonly IEntityViewBuilder[] entityViewBuilders;
- }
- }
|