Пример #1
0
        /// <summary>
        /// Generate a desert
        /// </summary>
        /// <param name="pg">LandMass desert belongs to.</param>
        /// <param name="points">Points in desert.</param>
        /// <param name="dist">distance between desert points</param>
        /// <returns>Desert PointGroup</returns>
        public PointGroup GenerateDesert(PointGroup pg, int points, int dist = 5)
        {
            MapPoint            mp  = pg.GetPointFromBounds();
            PointGroupGenerator pgg = new PointGroupGenerator();

            return(pgg.GenerateCluster(mp.X, mp.Y, points, MapTerrain.Desert, dist));
        }
Пример #2
0
        /// <summary>
        /// Generate a swamp
        /// </summary>
        /// <param name="pg">LandMass swamp belongs to.</param>
        /// <param name="size">Size of swamp</param>
        /// <param name="dist">distance between swamp points</param>
        /// <returns>Swamp PointGroup</returns>
        public PointGroup GenerateSwamp(PointGroup pg, int size, int dist = 5)
        {
            MapPoint            mp  = pg.GetPointFromBounds();
            PointGroupGenerator pgg = new PointGroupGenerator();

            return(pgg.GenerateCluster(mp.X, mp.Y, size, MapTerrain.Swamp, dist));
        }