Beispiel #1
0
 public string IDFromOutput(OutputPin op)
 {
     if (op == null)
     {
         return(null);
     }
     return(nodes.IndexOf(op.parentNode) + ":" + op.parentNode.OutPins.ToList().IndexOf(op));
 }
Beispiel #2
0
        public override NodeBase GetNextNode()
        {
            // condition is based on default value or a lookup value
            bool condition = valInPins[0].GetBool();

            NodeBase  output = null;
            OutputPin pin    = execOutPins[condition ? 0 : 1];

            if (pin.IsConnected)
            {
                output = pin.ConnectedInput.parentNode;
            }

            return(output);
        }
Beispiel #3
0
        public void ConnectPins(InputPin ip, OutputPin op)
        {
            ResetCompiledStatus();

            // limit pin connections per type
            // executions can only have one output, but multiple inputs
            if (op.IsConnected && op.varType == VarType.Exec)
            {
                op.ConnectedInput.ConnectedOutput = null;
            }

            if (ip.IsConnected && ip.varType != VarType.Exec)
            {
                ip.ConnectedOutput.ConnectedInput = null;
            }

            EditorUtility.SetDirty(this);
            ip.ConnectedOutput = op;
            op.ConnectedInput  = ip;
        }
Beispiel #4
0
 public override void OnAfterGraphDeserialize()
 {
     ConnectedOutput = this.parentNode.parentGraph.OutputFromID(cOutput);
 }