public virtual BaseConnection NewConnection(BaseNode from, string fromPortName, BaseNode to, string toPortName) { return(BaseConnection.CreateNew <BaseConnection>(from, fromPortName, to, toPortName)); }
//断开连接 public void Disconnect(BaseNode node, string portName) { Disconnect(node.Ports[portName]); }
public virtual BaseNode NewNode(Type type, Vector2 position) { return(BaseNode.CreateNew(this, type, position)); }
/// <summary> 给节点分配一个GUID,这将会覆盖已有GUID </summary> public static void IDAllocation(BaseNode node, BaseGraph graph) { node.guid = graph.GenerateNodeGUID(); }