private Connection(string label, string connectionId, string startNodeId, ConnectionPoint output, string endNodeId, ConnectionPoint input) { conInsp = ScriptableObject.CreateInstance <ConnectionInspector>(); conInsp.hideFlags = HideFlags.DontSave; this.label = label; this.connectionId = connectionId; this.startNodeId = startNodeId; this.outputPoint = output; this.endNodeId = endNodeId; this.inputPoint = input; connectionButtonStyle = "sv_label_0"; }
public static bool ContainsConnection(this List <Connection> connections, Node start, ConnectionPoint output, Node end, ConnectionPoint input) { foreach (var con in connections) { if (con.IsSameDetail(start, output, end, input)) { return(true); } } return(false); }
public static Connection NewConnection(string label, string startNodeId, ConnectionPoint output, string endNodeId, ConnectionPoint input) { return(new Connection( label, Guid.NewGuid().ToString(), startNodeId, output, endNodeId, input )); }
public static Connection LoadConnection(string label, string connectionId, string startNodeId, ConnectionPoint output, string endNodeId, ConnectionPoint input) { return(new Connection( label, connectionId, startNodeId, output, endNodeId, input )); }
public bool IsEndAtConnectionPoint(ConnectionPoint p) { return(inputPoint == p); }
public bool IsStartAtConnectionPoint(ConnectionPoint p) { return(outputPoint == p); }
public void AddInputPoint(string guid, string label) { inputConnectionPoints.Add(ConnectionPoint.InputPoint(guid, label)); Save(); UpdateNodeRect(); }
public void AddFilterOutputPoint(int addedIndex, string keyword) { outputConnectionPoints.Insert(addedIndex, ConnectionPoint.OutputPoint(Guid.NewGuid().ToString(), keyword)); Save(); UpdateNodeRect(); }