3 using System.Collections.Generic;
4 using System.Collections.Immutable;
7 using Microsoft.Xna.Framework;
11 internal sealed
class CircuitBoxInputOutputNode : CircuitBoxNode
22 public CircuitBoxInputOutputNode(IReadOnlyList<CircuitBoxConnection> conns, Vector2 initialPosition, Type type, CircuitBox circuitBox): base(circuitBox)
24 Size = CalculateSize(conns);
25 Connectors = conns.ToImmutableArray();
26 Position = initialPosition;
31 public XElement Save() =>
new XElement($
"{NodeType}Node",
new XAttribute(
"pos", XMLExtensions.Vector2ToString(Position)));
33 public void Load(ContentXElement element)
35 Position = element.GetAttributeVector2(
"pos", Vector2.Zero);