soundvision/UnityProject/Assets/Scripts/PdConnection/SpectrumArraySelector.cs

26 lines
636 B
C#
Raw Normal View History

2019-10-04 13:35:23 +00:00
namespace cylvester
{
public interface ISpectrumArraySelector
{
int Selection { set; }
float[] SelectedArray { get; }
}
public class SpectrumArraySelector : ISpectrumArraySelector
{
private int selection_;
private readonly ISpectrumArrayContainer arrayContainer_;
public SpectrumArraySelector(ISpectrumArrayContainer arrayContainer)
{
arrayContainer_ = arrayContainer;
}
public int Selection
{
set => selection_ = value;
}
public float[] SelectedArray => arrayContainer_[selection_].Data;
}
}