soundvision/UnityProject/Assets/Scripts/PdConnection/PdArraySelector.cs
Chikashi Miyama cb599bf5ca refer #62
2019-10-05 18:09:24 +02:00

26 lines
No EOL
600 B
C#

namespace cylvester
{
public interface IPdArraySelector
{
int Selection { set; }
float[] SelectedArray { get; }
}
public class PdArraySelector : IPdArraySelector
{
private int selection_;
private readonly IPdArrayContainer arrayContainer_;
public PdArraySelector(IPdArrayContainer arrayContainer)
{
arrayContainer_ = arrayContainer;
}
public int Selection
{
set => selection_ = value;
}
public float[] SelectedArray => arrayContainer_[selection_].Data;
}
}