using EcsRx.Components; using EcsRx.Components.Database; using EcsRx.Components.Lookups; using EcsRx.Plugins.Batching.Builders; namespace EcsRx.Plugins.Batching.Factories { public class ReferenceBatchBuilderFactory : IReferenceBatchBuilderFactory { public IComponentDatabase ComponentDatabase { get; } public IComponentTypeLookup ComponentTypeLookup { get; } public ReferenceBatchBuilderFactory(IComponentDatabase componentDatabase, IComponentTypeLookup componentTypeLookup) { ComponentDatabase = componentDatabase; ComponentTypeLookup = componentTypeLookup; } public IReferenceBatchBuilder Create() where T1 : class, IComponent where T2 : class, IComponent { return new ReferenceBatchBuilder(ComponentDatabase, ComponentTypeLookup); } public IReferenceBatchBuilder Create() where T1 : class, IComponent where T2 : class, IComponent where T3 : class, IComponent { return new ReferenceBatchBuilder(ComponentDatabase, ComponentTypeLookup); } public IReferenceBatchBuilder Create() where T1 : class, IComponent where T2 : class, IComponent where T3 : class, IComponent where T4 : class, IComponent { return new ReferenceBatchBuilder(ComponentDatabase, ComponentTypeLookup); } public IReferenceBatchBuilder Create() where T1 : class, IComponent where T2 : class, IComponent where T3 : class, IComponent where T4 : class, IComponent where T5 : class, IComponent { return new ReferenceBatchBuilder(ComponentDatabase, ComponentTypeLookup); } public IReferenceBatchBuilder Create() where T1 : class, IComponent where T2 : class, IComponent where T3 : class, IComponent where T4 : class, IComponent where T5 : class, IComponent where T6 : class, IComponent { return new ReferenceBatchBuilder(ComponentDatabase, ComponentTypeLookup); } } }