protected WireCreator(StreamingComponent visual, int pinIndex, EmploymentMatrix employmentMatrix) { Visual = visual; PinIndex = pinIndex; Wire = new StreamingWire(visual.SimpleShader); EmploymentMatrix = employmentMatrix; }
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); }
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); }