Ejemplo n.º 1
0
    public void CreateRoute(List <Waypoint> route)
    {
        ClearAllWaypoints();

        foreach (Waypoint waypoint in route)
        {
            WaypointMarker marker = CreateWaypoint(waypoint.Point.ToUTM().ToUnity());
            marker.SetWaypoint(waypoint);
        }
    }
Ejemplo n.º 2
0
    public WaypointMarker CreateWaypoint(Vector3 waypointPosition)
    {
        foreach (WaypointMarker marker in _waypointMarkers)
        {
            marker.SetLock(true);
        }
        _lineRendererRoute.positionCount++;
        _lineRendererRoute.SetPosition(_lineRendererRoute.positionCount - 1, waypointPosition);

        WaypointMarker waypoint = Instantiate(_waypointMarkerPrefab, waypointPosition, Quaternion.identity).GetComponent <WaypointMarker>();
        ThresholdZone  zone     = _thresholdZoneDict[_defaultZoneType];

        waypoint.SetWaypoint(new Waypoint {
            Point = waypointPosition.ToUTM().ToWGS84(), ThresholdZone = zone
        });
        _waypointMarkers.Add(waypoint);
        PlayerUIController.Instance.UpdateUI(RobotMasterController.SelectedRobot);
        return(waypoint);
    }