private void WireArithmeticNode(FlowTronic next, DataNodeIn DataInA, DataNodeIn DataInB, DataNodeOut DataOut, NodeType NextOut = NodeType.FlowOutA) { next.DataInA(DataInA); next.DataInB(DataInB); next.DataOutA(DataOut); Append(next, next.GetNode(NextOut)); }
/// <summary> /// Wires one of this tronic's FlowOut nodes to another tronic's FlowIn node /// </summary> /// <param name="other">Which tronic to wire to</param> /// <param name="which">Which FlowOut node to use, out of FlowOutA or FlowOutB. Most nodes just have FlowOutA</param> public virtual void FlowOutTo(FlowTronic other, NodeType which = NodeType.FlowOutA) { if (!(which == NodeType.FlowOutA || which == NodeType.FlowOutB)) { throw new Exception("Expected a FlowOut node, got something else"); } this.WireTo(this.GetNode(which), other.GetNode(NodeType.FlowIn)); }