public void AddPoint(ushort enter, byte source, byte target) { foreach (var pointType in Enum.GetValues(typeof(MarkupPoint.PointType)).OfType <MarkupPoint.PointType>()) { AddPoint(MarkupPoint.GetId(enter, source, pointType), MarkupPoint.GetId(enter, target, pointType)); } }
public static ObjectsMap Befor1_9(Markup markup, ObjectsMap map) { if (map == null) { map = new ObjectsMap(); } foreach (var enter in markup.Enters) { ref var segment = ref enter.GetSegment(); if (segment.Info.m_vehicleTypes.IsFlagSet(VehicleInfo.VehicleType.Plane)) { var sourceId = MarkupPoint.GetId(enter.Id, 2, MarkupPoint.PointType.Enter); var targetId = MarkupPoint.GetId(enter.Id, 3, MarkupPoint.PointType.Enter); map.AddPoint(sourceId, targetId); sourceId = MarkupPoint.GetId(enter.Id, 2, MarkupPoint.PointType.Crosswalk); targetId = MarkupPoint.GetId(enter.Id, 3, MarkupPoint.PointType.Crosswalk); map.AddPoint(sourceId, targetId); sourceId = MarkupPoint.GetId(enter.Id, 2, MarkupPoint.PointType.Normal); targetId = MarkupPoint.GetId(enter.Id, 3, MarkupPoint.PointType.Normal); map.AddPoint(sourceId, targetId); } }