示例#1
0
        public void ChangeSettings(GeneratorSettings settings)
        {
            this.Settings = settings;

            Random random = new Random(this.Settings.Seed);

            this.noiseByOctave[0] = Noise.GenerateWhiteNoise(PatchCoordinates.PatchWidth, PatchCoordinates.PatchHeight, random);
        }
示例#2
0
        public Generator(GeneratorSettings settings)
        {
            // Instantiate data structures.
            this.patchCache          = new TileType[PatchCoordinates.PatchWidth, PatchCoordinates.PatchHeight];
            this.patchOperationCache = new TileType[PatchCoordinates.PatchWidth, PatchCoordinates.PatchHeight];
            this.floatCache          = new float[PatchCoordinates.PatchWidth, PatchCoordinates.PatchHeight];
            this.noiseByOctave       = new float[NoiseOctaveCount][, ];

            this.ChangeSettings(settings);
        }