示例#1
0
    public void LoadRandomTile()
    {
        TilePath tile = GetRandomTile(zoom, scale1024);

        if (tile.IsValid())
        {
            LoadTile(tile);
        }
        else
        {
            Debug.Log("Unable to load tile");
        }
    }
示例#2
0
    public void ExportReal()
    {
        TilePath tile = maps ? GetRandomTile(10, true) : GetRandomTile(12, false);

        Debug.Log(tile.texture);

        if (tile.IsValid())
        {
            ExportTile(tile, "real");
        }
        else
        {
            Debug.Log("Unable to load tile");
        }
    }
示例#3
0
 private void LoadTile(TilePath tile)
 {
     if (tile.IsValid())
     {
         terrainLoader.heightmap = tile.LoadHeightRGB();
         terrainLoader.texture   = tile.LoadTexture();
         terrainLoader.rgbMap    = true;
         terrainLoader.Init();
     }
     else
     {
         Debug.Log("Unable to load tile");
         Debug.Log(tile.heightGS);
         Debug.Log(tile.heightRGB);
         Debug.Log(tile.texture);
     }
 }
示例#4
0
    public void Export()
    {
        TilePath tile = new TilePath(
            Path.Combine(basePath, "arith_" + index + "_gs.png"),
            Path.Combine(basePath, "arith_" + index + "_rgb.png"),
            Path.Combine(basePath, "arith_" + index + "_tex.png")
            );

        if (tile.IsValid())
        {
            ExportTile(tile, exportName);
        }
        else
        {
            Debug.Log("Unable to load tile");
            Debug.Log(tile.heightGS);
            Debug.Log(tile.heightRGB);
            Debug.Log(tile.texture);
        }
    }
示例#5
0
    public void ExportGenerated()
    {
        string prefix = maps ? "map" : "tile";

        TilePath tile = new TilePath(
            Path.Combine(generatedPath, prefix + "_generated_" + index + "_gs.png"),
            Path.Combine(generatedPath, prefix + "_generated_" + index + "_rgb.png"),
            Path.Combine(generatedPath, prefix + "_generated_" + index + "_tex.png")
            );

        if (tile.IsValid())
        {
            ExportTile(tile, "generated");
        }
        else
        {
            Debug.Log("Unable to load tile");
            Debug.Log(tile.heightGS);
            Debug.Log(tile.heightRGB);
            Debug.Log(tile.texture);
        }
    }