Esempio n. 1
0
    public void SetWorldPositionBaseOnRealPosition(float lat, float lon)
    {
        //var worldPosition = Conversions.GeoToWorldPosition(lat, lon, new Vector2d(49.73404, 4.167768), (float)0.000001f);
        //var worldPosition = Conversions.GeoToWorldGlobePosition(lat, lon, 500);
        var worldPosition = Map.GeoToWorldPositionXZ(new Vector2d(lat, lon));

        Debug.Log(worldPosition);
        Target.transform.position = worldPosition;
        DirectionsFactory.Query();
    }
Esempio n. 2
0
    public void Query()
    {
        var waypoints = new List <GeoCoordinate>();

        foreach (var wp in Waypoints)
        {
            waypoints.Add(wp.transform.GetGeoPosition());
        }

        Directions.Query(waypoints);
    }
Esempio n. 3
0
 void ReRoute()
 {
     stepsFactory.steps        = null;
     goUser.transform.position = map.GeoToWorldPosition(gps);
     directionsFactory.Query();
     //stepsFactory.Query();
     //routeProgressBarFactory.Query();
     //
     //Invoke("PresentFirstMessageDelayed", 1);
     ynMapFirst = true;
 }
        public void Query()
        {
            var waypoints = new List <Vector2d>();

            foreach (var wp in Waypoints)
            {
                waypoints.Add(wp.transform.GetGeoPosition(MapController.ReferenceTileRect.Center, MapController.WorldScaleFactor));
            }

            Directions.Query(waypoints);
        }
Esempio n. 5
0
    public void StartQuest(Quest quest)
    {
        DirectionsFactory df = GameObject.Find("Directions").GetComponent <DirectionsFactory>();

        df.endPos = new Vector2d(quest.Stop_co.Lat, quest.Stop_co.Lon);
        df.Query();
        DrawRadiationZones();
        GameObject.Find("QuestPanel").GetComponent <RectTransform>().localPosition = new Vector3(-800, 100, 0);
        controller.SetActiveQuest(quest);
        Debug.Log(quest.Stop_co.Lat);
        Debug.Log("Quest Started");
    }
Esempio n. 6
0
    public void StartLevel()
    {
        BaseObject.transform.position = BaseSpotTarget.transform.position;
        BaseObject.SetActive(true);

        endPath.transform.position = BaseObject.transform.position;
        directionFactory.gameObject.SetActive(true);
        directionFactory.Query();
        Level0.BasePosition = BaseObject.transform.position;
        Level0.GenerateRoutes();
        Level0.StartLevel();
        ButtonConfirmBasePlacement.SetActive(false);
        TextSelectBaseLocation.enabled = false;
    }