public List <Vector2> GetWaypoints() { if (_waypoints == null) { _waypoints = JsonUtility.FromJson <ListV2>(Waypoints); } return(_waypoints.list); }
public List <Vector2> GetListRoute() { if (listroute == null) { listroute = JsonUtility.FromJson <ListV2>(route); } return(listroute.list); }
public void CheckIfNeedToBeReversed(Location startLocation) { if (from != startLocation.id && !_reversed) { if (listroute == null) { listroute = JsonUtility.FromJson <ListV2>(route); } listroute.list.Reverse(); _reversed = true; } }
public void GetWayPointsTemp() { List <Vector2> list = new List <Vector2>(); for (int i = 0; i < TempWaypointsPanel.transform.childCount; i++) { if (TempWaypointsPanel.transform.GetChild(i).gameObject.activeSelf) { list.Add(TempWaypointsPanel.transform.GetChild(i).localPosition); } } ListV2 v2 = new ListV2(); v2.list = list; }