public void AddPipe(EdgeRoad pipe, IntersectionPipeType type) { intersectionPipes.Add(new IntersectionPipe(pipe, type)); if (type == IntersectionPipeType.In) { Connectors.Add(new Point2D(pipe.To.X, pipe.To.Y)); } else if (type == IntersectionPipeType.Out) { Connectors.Add(new Point2D(pipe.From.X, pipe.From.Y)); } }
public IntersectionPipe(EdgeRoad edgeRoad, IntersectionPipeType intersectionType) { EdgeRoad = edgeRoad; IntersectionType = intersectionType; }