public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, laneColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, laneColor + selectedColor);
            AnnotationGizmos.DrawArrowHeads(transform, mapLocalPositions, laneColor + selectedColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    LANE " + laneTurnType);
#endif
            }

#if UNITY_EDITOR
            if (UnityEditor.Selection.activeGameObject == this.gameObject && MapAnnotationTool.SHOW_MAP_SELECTED)
            {
                foreach (var yl in yieldToLanes)
                {
                    if (yl != null)
                    {
                        AnnotationGizmos.DrawWaypoints(yl.transform, yl.mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.25f, new Color(1f, 1f, 0f, 0.5f));
                        AnnotationGizmos.DrawLines(yl.transform, yl.mapLocalPositions, new Color(1f, 1f, 0f, 0.5f));
                        AnnotationGizmos.DrawArrowHeads(yl.transform, yl.mapLocalPositions, new Color(1f, 1f, 0f, 0.5f));
                    }
                }
            }
#endif
        }
Beispiel #2
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            Color typeColor = Color.clear;

            switch (lineType)
            {
            case LineType.UNKNOWN:
                typeColor = Color.black;
                break;

            case LineType.SOLID_WHITE:
            case LineType.DOTTED_WHITE:
            case LineType.DOUBLE_WHITE:
                typeColor = whiteLineColor;
                break;

            case LineType.SOLID_YELLOW:
            case LineType.DOTTED_YELLOW:
            case LineType.DOUBLE_YELLOW:
                typeColor = yellowLineColor;
                break;

            case LineType.CURB:
                typeColor = curbColor;
                break;

            case LineType.STOP:
                typeColor = stopLineColor;
                break;

            case LineType.VIRTUAL:
                typeColor = virtualLineColor;
                break;

            default:
                break;
            }

            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    " + lineType + " LINE");
#endif
            }
            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, typeColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, typeColor + selectedColor);
        }
Beispiel #3
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, junctionColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, junctionColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    JUNCTION");
#endif
            }
        }
Beispiel #4
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, parkingSpaceColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, parkingSpaceColor + selectedColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    PARKINGSPACE");
#endif
            }
        }
Beispiel #5
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 3)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, clearAreaColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, clearAreaColor + selectedColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    CLEARAREA");
#endif
            }
        }
Beispiel #6
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.WAYPOINT_SIZE, speedBumpColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, speedBumpColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    SPEEDBUMP");
#endif
            }
        }
Beispiel #7
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.WAYPOINT_SIZE, pedestrianColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, pedestrianColor + selectedColor);
            AnnotationGizmos.DrawArrowHeads(transform, mapLocalPositions, pedestrianColor + selectedColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    PEDESTRIAN " + type);
#endif
            }
        }
Beispiel #8
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 2)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.PROXIMITY * 0.5f, laneColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, laneColor + selectedColor);
            AnnotationGizmos.DrawArrowHeads(transform, mapLocalPositions, laneColor + selectedColor);
            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    LANE " + laneTurnType);
#endif
            }
        }
Beispiel #9
0
        public override void Draw()
        {
            if (mapLocalPositions.Count < 3)
            {
                return;
            }

            AnnotationGizmos.DrawWaypoints(transform, mapLocalPositions, MapAnnotationTool.WAYPOINT_SIZE, crossWalkColor + selectedColor);
            AnnotationGizmos.DrawLines(transform, mapLocalPositions, crossWalkColor + selectedColor);

            if (MapAnnotationTool.SHOW_HELP)
            {
#if UNITY_EDITOR
                UnityEditor.Handles.Label(transform.position, "    CROSSWALK");
#endif
            }
        }