Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public NodeFlowInKnob CreateFlowInKnob(string cotName = "入", float offset = 20)
 {
     return(NodeFlowInKnob.Create(this, cotName, offset));
 }