|
|
@ -41,17 +41,15 @@ namespace Mapbox.Unity.MeshGeneration.Factories |
|
|
|
private List<Vector3> _cachedWaypoints; |
|
|
|
private List<Vector3> _cachedWaypoints; |
|
|
|
private Directions _directions; |
|
|
|
private Directions _directions; |
|
|
|
private int _counter; |
|
|
|
private int _counter; |
|
|
|
private bool _isDragging = false; |
|
|
|
|
|
|
|
private Vector3[] _pointArray; |
|
|
|
private Vector3[] _pointArray; |
|
|
|
private Vector3 _pointUpDelta = new Vector3(0, 3, 0); |
|
|
|
private Vector3 _pointUpDelta = new Vector3(0, 3, 0); |
|
|
|
GameObject _directionsGO; |
|
|
|
GameObject _directionsGO; |
|
|
|
private bool _recalculateNext; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void Awake() |
|
|
|
protected virtual void Awake() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (_map == null) |
|
|
|
if (_map == null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
_map = FindObjectOfType<AbstractMap>(); |
|
|
|
_map = FindFirstObjectByType<AbstractMap>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_directions = MapboxAccess.Instance.Directions; |
|
|
|
_directions = MapboxAccess.Instance.Directions; |
|
|
@ -73,7 +71,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories |
|
|
|
ArrangingWaypointsStarted(); |
|
|
|
ArrangingWaypointsStarted(); |
|
|
|
_lineRenderer.gameObject.SetActive(true); |
|
|
|
_lineRenderer.gameObject.SetActive(true); |
|
|
|
_directionsGO.SetActive(false); |
|
|
|
_directionsGO.SetActive(false); |
|
|
|
_isDragging = true; |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
wp.MouseDraging += () => |
|
|
|
wp.MouseDraging += () => |
|
|
@ -91,7 +88,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories |
|
|
|
{ |
|
|
|
{ |
|
|
|
ArrangingWaypointsFinished(); |
|
|
|
ArrangingWaypointsFinished(); |
|
|
|
_lineRenderer.gameObject.SetActive(false); |
|
|
|
_lineRenderer.gameObject.SetActive(false); |
|
|
|
_isDragging = false; |
|
|
|
|
|
|
|
Query(); |
|
|
|
Query(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
@ -105,7 +101,6 @@ namespace Mapbox.Unity.MeshGeneration.Factories |
|
|
|
_cachedWaypoints.Add(item.position); |
|
|
|
_cachedWaypoints.Add(item.position); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_recalculateNext = false; |
|
|
|
|
|
|
|
_loftModifier.Initialize(); |
|
|
|
_loftModifier.Initialize(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|