Ejemplo n.º 1
0
    public void CreateExampleMap()
    {
        LoadedNormalTiles = new Dictionary <Vector2i, NormalTerrainTile>();
        double lon   = 139.819038;
        double lat   = 35.666048;
        int    xCoor = CoordinatesConverter.LonToX(lon, 14);
        int    yCoor = CoordinatesConverter.LatToY(lat, 14);

        xCoor = 14555;
        yCoor = 6452;

        int xNum = 1;
        int yNum = 1;

        isUseToggle = usePNGtoggle.isOn;

        Vector3 startPos = new Vector3(0, 0, 0);

        //draw map
        for (int i = xCoor; i < xCoor + xNum; i++)
        {
            for (int j = yCoor; j < yCoor + yNum; j++)
            {
                create(new Vector2i(i, j), startPos);
                startPos.z += TerrainSize;
            }
            startPos.x += TerrainSize;
            startPos.z  = 0;
        }
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        double lon       = 139.820550;
        double lat       = 35.665557;
        int    zoomLevel = 14;

        Debug.Log(CoordinatesConverter.LonToX(lon, zoomLevel));
        Debug.Log(CoordinatesConverter.LatToY(lat, zoomLevel));
    }