public unsafe bool SetInputs(IEnumerable <Playable> sources)
{
for (int i = 0; i < this.inputCount; i++)
{
Playable.Disconnect(*((Playable *)this), i);
}
bool flag = false;
int targetInputPort = 0;
foreach (Playable playable in sources)
{
if (targetInputPort < this.inputCount)
{
flag |= Playable.Connect(playable, *((Playable *)this), -1, targetInputPort);
}
else
{
flag |= Playable.Connect(playable, *((Playable *)this), -1, -1);
}
this.node.SetInputWeight(targetInputPort, 1f);
targetInputPort++;
}
for (int j = targetInputPort; j < this.inputCount; j++)
{
this.node.SetInputWeight(j, 0f);
}
return(flag);
}