示例#1
0
        void RegisterNode(Node node)
        {
            NodeEditor.Assertions.IsFalse(Nodes.Contains(node), "Node already exists in this graph.");

            if (!Nodes.Contains(node))
            {
                NodeEditor.Logger.Log <NodeGraph>("Registered node.");
                node.Destroyed  += RemoveNode;
                node.Changed    += Node_Changed;
                node.PinRemoved += Node_PinRemoved;

                Nodes.Add(node);
                NodeAdded.InvokeSafe(node);

                Edited.InvokeSafe(this);
            }
        }
示例#2
0
 void Graph_NodeAdded(Node node)
 {
     NodeAdded.InvokeSafe(node);
 }