Esempio n. 1
0
        public static RerouteNode MakeType(NodeGraph graph, int numTypes)
        {
            var node = new RerouteNode(graph);

            for (int i = 0; i < numTypes; i++)
            {
                node.AddInputTypePin($"Type{i}");
                node.AddOutputTypePin($"Type{i}", new ObservableValue <BaseType>(null));
            }

            return(node);
        }
Esempio n. 2
0
        public static RerouteNode MakeExecution(NodeGraph graph, int numExecs)
        {
            var node = new RerouteNode(graph);

            for (int i = 0; i < numExecs; i++)
            {
                node.AddInputExecPin($"Exec{i}");
                node.AddOutputExecPin($"Exec{i}");
            }

            return(node);
        }
Esempio n. 3
0
        public static RerouteNode MakeData(NodeGraph graph, IEnumerable <ValueTuple <BaseType, BaseType> > dataTypes)
        {
            if (dataTypes is null)
            {
                throw new ArgumentException("dataTypes was null in RerouteNode.MakeData.");
            }

            var node = new RerouteNode(graph);

            int index = 0;

            foreach (var dataType in dataTypes)
            {
                node.AddInputDataPin($"Data{index}", dataType.Item1);
                node.AddOutputDataPin($"Data{index}", dataType.Item2);
                index++;
            }

            return(node);
        }