soundvision/UnityProject/Assets/Scripts/VideoInput/ComponentFactory.cs

21 lines
485 B
C#
Raw Normal View History

namespace VideoInput
{
public interface IComponentFactory
{
IKinectSensor CreateKinectSensor();
IInfraredCamera CreateInfraredCamera();
}
public class ComponentFactory : IComponentFactory
{
public IKinectSensor CreateKinectSensor()
{
return new KinectSensor(CreateInfraredCamera());
}
public IInfraredCamera CreateInfraredCamera()
{
return new InfraredCamera();
}
}
}