Beispiel #1
0
 public Chunk this[Vector3 position]
 {
     get
     {
         return(this[ChunkAddress.FromPosition(position)]);
     }
 }
Beispiel #2
0
 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;
        }
Beispiel #4
0
 public Chunk this[ChunkAddress address]
 {
     get
     {
         if (!IsGenerated(address))
         {
             var factory = new ChunkFactory(this, address);
             chunks[address] = factory.Create();
         }
         return(chunks[address]);
     }
 }
Beispiel #5
0
 public bool IsGenerated(ChunkAddress address)
 {
     return(chunks.ContainsKey(address));
 }
Beispiel #6
0
 public bool IsGenerated(Vector3 position)
 {
     return(IsGenerated(ChunkAddress.FromPosition(position)));
 }
Beispiel #7
0
 public ChunkFactory(Dimension dimension, ChunkAddress address)
 {
     this.dimension = dimension;
     this.address   = address;
 }