Exemplo n.º 1
0
 public string IDFromOutput(OutputPin op)
 {
     if (op == null)
     {
         return(null);
     }
     return(nodes.IndexOf(op.parentNode) + ":" + op.parentNode.OutPins.ToList().IndexOf(op));
 }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public override void OnAfterGraphDeserialize()
 {
     ConnectedOutput = this.parentNode.parentGraph.OutputFromID(cOutput);
 }