Beispiel #1
0
    //Set Game Location to random distance (within range) away from closest Landmark
    private void setGameLocations(GameLocation gl)
    {
        //Generate two random offsets for LAtitude and Longitude
        double latOffset = Random.Range(Constants.MIN_DISPLACEMENT, Constants.MAX_DISPLACEMENT);
        double lonOffset = Random.Range(Constants.MIN_DISPLACEMENT, Constants.MAX_DISPLACEMENT);

        double lat = gl.getClosest().getPosition().GetLatitude();
        double lon = gl.getClosest().getPosition().GetLongitude();

        gl.SetPosition(new LatLong(Translation.Instance.offsetLat(lat, latOffset), Translation.Instance.offsetLon(lon, lat, lonOffset)));
    }