Exemplo n.º 1
0
    ProceduralGenerator GenerateMapFromRandom()
    {
        ProceduralGenerator mapGen = GetComponent <ProceduralGenerator>();

        width  = mapGen.GetWidth();
        height = mapGen.GetHeight();
        Color32[] colorMap = mapGen.GenerateMap();
        GenerateMapPreview(colorMap);

        MapData.Width         = width;
        MapData.Height        = height;
        MapData.ColorMap      = colorMap;
        MapData.BaseLocationX = mapGen.GetBaseLocationX();
        MapData.BaseLocationY = mapGen.GetBaseLocationY();

        return(mapGen);
    }