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); }
public TerrainShape(TextAsset biomesJSON) { biomeGenerator = new BiomeGenerator(biomesJSON); biomeGenerator.GenerateBiomes(); }