public void createDirectedConnection(Node node, object data) { NodeConnectionData connectionData = new NodeConnectionData(data); addConnection(new NodeConnection(node, connectionData)); node.addConnection(new NodeConnection(this, connectionData)); }
protected sealed override Dictionary <ConnectionType, NodeConnectionData> GetConnections() { NodeConnectionData DefaultData = new NodeConnectionData(transform.parent.GetComponent <Node>(), new List <Node>(GetChildren()), transform.Find("Default Connection").GetComponent <LineRenderer>()); NodeConnectionData PowerData = new NodeConnectionData(powerParent, new List <Node>(powerChildren), transform.Find("Power Connection").GetComponent <LineRenderer>()); return(new Dictionary <ConnectionType, NodeConnectionData>() { { ConnectionType.Default, DefaultData }, { ConnectionType.Power, PowerData } }); }
public void setData(object data) { if (data == null) { this.data = new NodeConnectionData(data); } else { this.data.setData(data); } }
public NodeConnection(Node toNode, object data) { node = toNode; this.data = new NodeConnectionData(data); }
public NodeConnection(Node toNode, NodeConnectionData data) { node = toNode; this.data = data; }