public override void Linking(NodeKnob other) { base.Linking(other); if (other.GetType() != typeof(NodeFlowInKnob)) { return; } other.ClearConnection(); ClearConnection(); connection = other as NodeFlowInKnob; (other as NodeFlowInKnob).connection = this; }
public static NodeFlowInKnob Create(Node nodeBody, string cotName, float offset) { NodeFlowInKnob flowIn = CreateInstance <NodeFlowInKnob>(); #if UNITY_EDITOR Undo.RegisterCreatedObjectUndo(flowIn, "Create Node"); #endif flowIn.CotName = cotName; flowIn.Init(nodeBody, "FlowIn", Side.Left, offset); nodeBody.FlowIn = flowIn; return(flowIn); }
protected internal override void ClearConnection() { foreach (NodeOutput knob in Body.outputKnobs) { if (knob.connection == null) { continue; } knob.ClearConnection(); } if (connection == null) { return; } var temp = connection; connection = null; temp.ClearConnection(); }
public NodeFlowInKnob CreateFlowInKnob(string cotName = "入", float offset = 20) { return(NodeFlowInKnob.Create(this, cotName, offset)); }