protected override void ReadData(BinaryReader reader)
    {
        int numBiomes = reader.ReadInt32();

        Vector4[] biomes = new Vector4[numBiomes];
        for (int i = 0; i < numBiomes; i++)
        {
            float x     = reader.ReadSingle();
            float y     = reader.ReadSingle();
            float z     = reader.ReadSingle();
            int   biome = reader.ReadInt32();

            biomes[i] = new Vector4(x, y, z, biome);
        }

        biomeGenerator.GenerateBiomes(biomes);
    }
示例#2
0
 public TerrainShape(TextAsset biomesJSON)
 {
     biomeGenerator = new BiomeGenerator(biomesJSON);
     biomeGenerator.GenerateBiomes();
 }