Пример #1
0
    public void Activate()
    {
        isActive = true;

        inputHandler.OnLeftMouseUp  += OnSetPoint;
        inputHandler.OnRightMouseUp += OnCancel;

        if (MarkrContainer == null)
        {
            MarkrContainer = Instantiate(markerContainerPrefab, map.transform, false);
            MarkrContainer.Init();
        }
    }
Пример #2
0
    private void SetPoint(Coordinate coord)
    {
#if SAFETY_CHECK
        if (networkPatch == null || reachabilityPatch == null)
        {
            Debug.LogWarning("Network layer or reachability layer is not available");
            return;
        }
#endif
        if (networkPatch.graph.IsInside(coord.Longitude, coord.Latitude))
        {
            if (!isMultiStart)
            {
                startPoints.Clear();
                MarkrContainer.ClearMarkers();
            }

            startPoints.Add(coord);
            MarkrContainer.AddMarker(coord);

            UpdateGrid();
        }
    }