private void WalkValuePort(IValuePort port) { // Debug.Log($"Walking Value Port {port}"); foreach (var next in port.Execute()) { // TODO: Handle Yield Instructions / Custom Yield Instructions if (next is IValuePort nextPort) { // Debug.Log($"Moving Towards Next Port {nextPort}"); if (nextPort.Direction == PortDirection.Output) { WalkValuePort(nextPort); } } } }
public static IEnumerable <IValuePort> GetConnectedPorts(this IValuePort self) { return(self.Connections.Select(c => c.Source == self ? (IValuePort)c.Destination : c.Source)); }