コード例 #1
0
ファイル: Node.cs プロジェクト: ipud2/csg-toolkit
 /// <summary>
 /// Draws the node curves; splitted from knobs because of the render order
 /// </summary>
 public void DrawConnections()
 {
     for (int outCnt = 0; outCnt < Outputs.Count; outCnt++)
     {
         NodeOutput output = Outputs [outCnt];
         for (int conCnt = 0; conCnt < output.connections.Count; conCnt++)
         {
             NodeEditor.DrawConnection(output.GetGUIKnob().center,
                                       output.connections [conCnt].GetGUIKnob().center,
                                       ConnectionTypes.GetTypeData(output.type).col);
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// Draws the node curves; splitted from knobs because of the render order
        /// </summary>
        public void DrawConnections()
        {
            for (int outCnt = 0; outCnt < Outputs.Count; outCnt++)
            {
                NodeOutput output   = Outputs [outCnt];
                Vector2    startPos = output.GetGUIKnob().center;
                Vector2    startDir = output.GetDirection();

                for (int conCnt = 0; conCnt < output.connections.Count; conCnt++)
                {
                    NodeInput input = output.connections [conCnt];
                    NodeEditor.DrawConnection(startPos,
                                              startDir,
                                              input.GetGUIKnob().center,
                                              input.GetDirection() * -1,
                                              ConnectionTypes.GetTypeData(output.type).col);
                }
            }
        }