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); } }
void Graph_NodeAdded(Node node) { NodeAdded.InvokeSafe(node); }