Beispiel #1
0
    void Start()
    {
        _cornerCoordinates = GameObject.Find("MainCanvas").GetComponent <CornerCoordinates>();
        _scoreManager      = GameObject.Find("LevelManager").GetComponent <ScoreManager>();

        _startCheckDelay = 2f;
    }
Beispiel #2
0
        // get the corner (X, Y) coordinates of the  OSM tiles of the map.
        public CornerCoordinates ComputeMapCoordinateBounds()
        {
            var result = new CornerCoordinates();

            result.minLon = Math.Min(_leftBottom.X, _rightTop.X);
            result.maxLon = Math.Max(_leftBottom.X, _rightTop.X);
            result.minLat = Math.Min(_leftBottom.Y, _rightTop.Y);
            result.maxLat = Math.Max(_leftBottom.Y, _rightTop.Y);
            return(result);
        }
Beispiel #3
0
        // get the corner (Lon, Lat) coordinates of the GPX track.
        public CornerCoordinates ComputeTrackCoordinates(GPXCoordinateList coords)
        {
            var coord = new CornerCoordinates();

            coord.maxLon = coords.Max(c => c.Longitude);
            coord.maxLat = coords.Max(c => c.Latitude);
            coord.minLon = coords.Min(c => c.Longitude);
            coord.minLat = coords.Min(c => c.Latitude);
            return(coord);
        }
Beispiel #4
0
        // get the corner (Lon, Lat) coordinates of the OSM tiles of the map.
        public CornerCoordinates ComputeTrackCoordinateBounds()
        {
            var result = new CornerCoordinates();

            result.minLon = Math.Min(_leftBottom.Left, _rightTop.Left);
            result.maxLon = Math.Max(_leftBottom.Right, _rightTop.Right);
            result.minLat = Math.Min(_leftBottom.Bottom, _rightTop.Bottom);
            result.maxLat = Math.Max(_leftBottom.Top, _rightTop.Top);
            return(result);
        }