示例#1
0
 protected WireCreator(StreamingComponent visual, int pinIndex, EmploymentMatrix employmentMatrix)
 {
     Visual           = visual;
     PinIndex         = pinIndex;
     Wire             = new StreamingWire(visual.SimpleShader);
     EmploymentMatrix = employmentMatrix;
 }
示例#2
0
        public void ConnectWire(StreamingVisual from, int outNum, StreamingVisual to, int inNum)
        {
            StreamingWire wire = new StreamingWire(from.SimpleShader);

            Childrens.Add(wire);
            List <Vector2> points = new List <Vector2>
            {
                from.OutputPosition(outNum),
                to.InputPosition(inNum)
            };

            wire.Path = points;
            from.ConnectTo(outNum, wire, 0);
            wire.ConnectTo(0, to, inNum);
        }
示例#3
0
        public void ConnectWire(StreamingVisual from, int outNum, StreamingVisual to, int inNum, Vector2[] middlePoints)
        {
            StreamingWire wire = new StreamingWire(from.SimpleShader);

            Childrens.Add(wire);

            Vector2 posOut = from.OutputPosition(outNum);
            Vector2 posIn  = to.InputPosition(inNum);

            List <Vector2> points = new List <Vector2>();

            points.Add(posOut);
            points.AddRange(middlePoints);
            points.Add(posIn);
            wire.Path = points;
            from.ConnectTo(outNum, wire, 0);
            wire.ConnectTo(0, to, inNum);
        }