Exemple #1
0
        public Form1()
        {
            InitializeComponent();
            Node testNode = new Node();
            testNode.code = OpCode.op_kill;

            Node testNode2 = new Node();
            testNode2.code = OpCode.op_playanim;

            Param testParam = new Param();
            testParam.label = "Actor";
            testParam.size = 4;
            testParam.type = Type.pactor;
            testParam.data = 0;

            Param testOutParam = new Param();
            testOutParam.label = "Int";
            testOutParam.size = 4;
            testOutParam.type = Type.pint;
            testOutParam.data = 0;

            testNode2.inParams.Add(testParam);
            testNode.outParams.Add(testOutParam);
            ctrlNode1.NodeData = testNode;
            ctrlNode2.NodeData = testNode2;

            ctrlNode1.ConnectParam(0, ctrlNode2, 0);
        }
Exemple #2
0
        public static void ConnectNodeParams(Param outParam, Param inParam)
        {
            // There should only be 1 connection on the inParam.
            // Let's make sure this is the case.
            Param oldInConnection = inParam.Connections[0];
            oldInConnection.RemoveConnection(inParam);
            inParam.ClearConnections();

            outParam.AddConnection(inParam);
            inParam.AddConnection(outParam);
        }
Exemple #3
0
 public void AddOutParam(Param outParam)
 {
     outParams.Add(outParam);
     outParam.parent = this;
 }
Exemple #4
0
 public void AddInParam(Param inParam)
 {
     inParams.Add(inParam);
     inParam.parent = this;
 }
Exemple #5
0
 public void RemoveConnection(Param connection)
 {
     connections.Remove(connection);
     OnConnectionChanged(ParamsConnectedEventArgs.EventType.Broken);
 }
Exemple #6
0
 public void AddConnection(Param connection)
 {
     connections.Add(connection);
     OnConnectionChanged(ParamsConnectedEventArgs.EventType.Connected);
 }