Example #1
0
            public void createDirectedConnection(Node node, object data)
            {
                NodeConnectionData connectionData = new NodeConnectionData(data);

                addConnection(new NodeConnection(node, connectionData));
                node.addConnection(new NodeConnection(this, connectionData));
            }
Example #2
0
    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 }
        });
    }
Example #3
0
 public void setData(object data)
 {
     if (data == null)
     {
         this.data = new NodeConnectionData(data);
     }
     else
     {
         this.data.setData(data);
     }
 }
Example #4
0
 public NodeConnection(Node toNode, object data)
 {
     node      = toNode;
     this.data = new NodeConnectionData(data);
 }
Example #5
0
 public NodeConnection(Node toNode, NodeConnectionData data)
 {
     node      = toNode;
     this.data = data;
 }