Exemple #1
0
 public Chunk this[Vector3 position]
 {
     get
     {
         return(this[ChunkAddress.FromPosition(position)]);
     }
 }
 public BiomeMap(int temperatureSeed, int humiditySeed, ChunkAddress address)
 {
     temperatureMap = new TemperatureMap(temperatureSeed);
     humidityMap    = new HumidityMap(humiditySeed);
     map            = new string[Chunk.Size, Chunk.Size];
     this.address   = address;
 }
        public HeightMap(int seed, ChunkAddress address, float maxHeight)
        {
            noise = new OctavePerlinNoise(seed, 6);
            map   = new float[Chunk.Size, Chunk.Size];

            this.address   = address;
            this.maxHeight = maxHeight;
        }
Exemple #4
0
 public Chunk this[ChunkAddress address]
 {
     get
     {
         if (!IsGenerated(address))
         {
             var factory = new ChunkFactory(this, address);
             chunks[address] = factory.Create();
         }
         return(chunks[address]);
     }
 }
Exemple #5
0
 public bool IsGenerated(ChunkAddress address)
 {
     return(chunks.ContainsKey(address));
 }
Exemple #6
0
 public bool IsGenerated(Vector3 position)
 {
     return(IsGenerated(ChunkAddress.FromPosition(position)));
 }
Exemple #7
0
 public ChunkFactory(Dimension dimension, ChunkAddress address)
 {
     this.dimension = dimension;
     this.address   = address;
 }