public override void SetFlow(int x) { this.Flow = x; if (OutputA != null) { OutputA.SetFlow(Flow); } }
public override void SetFlow(int x) { this.Flow = x; if (OutputA != null) { OutputA.SetFlow(Ratio * Flow); } if (OutputB != null) { OutputB.SetFlow((100 - Ratio) * Flow); } }
public void ChangeRatio(int ratio) { Ratio = ratio; if (OutputA != null) { OutputA.SetFlow(Ratio * Flow); } if (OutputB != null) { OutputB.SetFlow((100 - Ratio) * Flow); } }
/// <summary> /// sets the safety limit to the given value /// </summary> /// <param name="limit"></param> public override void SetSafetyLimit(int limit) { this.SafetyLimit = limit; if (OutputA is Pipe) { Pipe temp = (Pipe)OutputA; if (temp.GetSafetyLimit() != limit) { OutputA.SetSafetyLimit(limit); } } if (InputA is Pipe) { Pipe temp = (Pipe)InputA; if (temp.GetSafetyLimit() != limit) { InputA.SetSafetyLimit(limit); } } }