コード例 #1
0
        public override float Added(OverworldGeneratorV2 generator, float x, float y)
        {
            float noise = generator.SimplexInstance(Octave).GetValue(x / Wavelength, y / Wavelength);

            noise = Math.Abs(noise);
            noise = TerrainBase.BlendedHillHeight(noise, MinimumSimplex);
            noise = TerrainBase.UnsignedPower(noise, Power);
            return(noise * Spiked.Added(generator, x, y));
        }
コード例 #2
0
        public override float Added(OverworldGeneratorV2 generator, float x, float y)
        {
            ISimplexData2D jitterData = SimplexData2D.NewDisk();

            generator.SimplexInstance(1).GetValue(x / Wavelength, y / Wavelength, jitterData);
            int pX = (int)Math.Round(x + jitterData.GetDeltaX() * Amplitude);
            int pY = (int)Math.Round(y + jitterData.GetDeltaY() * Amplitude);

            return(Jittered.Added(generator, pX, pY));
        }