示例#1
0
        /// <summary>
        /// Generates a mountain for the given 2D coordinates.
        /// Returns a basic heightmap.
        /// </summary>
        /// <param name="x">X coordinate.</param>
        /// <param name="y">Y coordinate.</param>
        /// <returns>Height map.</returns>
        public static double[,] GenerateMountain(int x, int y)
        {
            SimpleMountainGenerator smg = new SimpleMountainGenerator();

            smg.RunMountainGen((ulong)(x * 39 + y), true);
            return(smg.HeightMap);
        }
示例#2
0
        public static SimpleMountainGenerator PreGenerateMountain(int x, int y)
        {
            SimpleMountainGenerator smg = new SimpleMountainGenerator()
            {
                PreRunImage = false
            };

            smg.RunMountainGen((ulong)(x * 39 + y), false);
            smg.ToHandle = null;
            return(smg);
        }