Exemplo n.º 1
0
    public void evaluateNodes(NodeBase startNode, NodeBase lastRecursionNode)
    {

        foreach (NodeInput parent in startNode.nodeInputs)
        {
            NodeBase previousNode = parent.inputNode;
            if (previousNode != null && previousNode != lastRecursionNode)
                evaluateNodes(previousNode, startNode);
        }

        Debug.Log(startNode.nodeName);// + " " + startNode.parameters["value"].floatParam);
        startNode.evaluateNode();

        foreach (NodeOutput child in startNode.nodeOutputs)
        {
            NodeBase nextNode = child.connectedToNode;
            if (nextNode != null && nextNode != lastRecursionNode)
            {
                evaluateNodes(nextNode, startNode);
            }
        }
    }