Пример #1
0
            public static DunesDescription CreateFromPlacement(Point origin, int width, int height)
            {
                Rectangle area = new Rectangle(origin.X - width / 2, origin.Y - height / 2, width, height);

                return(new DunesDescription
                {
                    Area = area,
                    IsValid = true,
                    Surface = SurfaceMap.FromArea(area.Left - 20, area.Width + 40),
                    WindDirection = ((WorldGen.genRand.Next(2) != 0) ? WindDirection.Right : WindDirection.Left)
                });
            }
Пример #2
0
 public static DunesBiome.DunesDescription CreateFromPlacement(
     Point origin,
     int width,
     int height)
 {
     Microsoft.Xna.Framework.Rectangle rectangle = new Microsoft.Xna.Framework.Rectangle(origin.X - width / 2, origin.Y - height / 2, width, height);
     return(new DunesBiome.DunesDescription()
     {
         Area = rectangle,
         IsValid = true,
         Surface = SurfaceMap.FromArea(rectangle.Left - 20, rectangle.Width + 40),
         WindDirection = WorldGen.genRand.Next(2) == 0 ? DunesBiome.WindDirection.Left : DunesBiome.WindDirection.Right
     });
 }