protected override void OnInitialize() { base.OnInitialize(); _in1 = AddInputPin <NodePinTypeAny>("In 1"); _in2 = AddInputPin <NodePinTypeAny>("In 2"); _out = AddOutputPin <NodePinTypeAny>("Out"); }
protected override void OnInitialize() { AddExecuteInPin(); base.OnInitialize(); // Add parent input. _onTrue = AddExecuteOutPin("True"); _onFalse = AddExecuteOutPin("False"); }
public void Disconnect(NodePin pin) { var connection = Connections .Where(x => x.LeftNode == pin.Node && x.SourcePin == pin || x.RightNode == pin.Node && x.TargetPin == pin) .ToList(); if (connection.Count != 0) { connection.ForEach(x => Disconnect(x)); } }
void SpawnPins() { if (AccessorType == NodeGraphVariableAccessorType.GetSet || AccessorType == NodeGraphVariableAccessorType.Set) { AddInputPin <NodePinTypeExecute>("In"); ExecuteOut = AddOutputPin <NodePinTypeExecute>("Out"); } if (AccessorType == NodeGraphVariableAccessorType.GetSet || AccessorType == NodeGraphVariableAccessorType.Get) { AddGetPin(); } if (AccessorType == NodeGraphVariableAccessorType.GetSet || AccessorType == NodeGraphVariableAccessorType.Set) { AddSetPin(); } }
void Node_PinRemoved(NodePin pin) { Disconnect(pin); Edited.InvokeSafe(this); }