Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CreateFromPlacement()

static DunesDescription Terraria.GameContent.Biomes.DunesBiome.DunesDescription.CreateFromPlacement ( Point origin,
int width,
int height )
inlinestatic

Definition at line 26 of file DunesBiome.cs.

27 {
28 Rectangle area = new Rectangle(origin.X - width / 2, origin.Y - height / 2, width, height);
29 return new DunesDescription
30 {
31 Area = area,
32 IsValid = true,
33 Surface = SurfaceMap.FromArea(area.Left - 20, area.Width + 40),
34 WindDirection = ((WorldGen.genRand.Next(2) != 0) ? WindDirection.Right : WindDirection.Left)
35 };
36 }
static SurfaceMap FromArea(int startX, int width)
Definition SurfaceMap.cs:43

References Terraria.GameContent.Biomes.DunesBiome.DunesDescription.Area, Terraria.GameContent.Biomes.Desert.SurfaceMap.FromArea(), Terraria.WorldGen.genRand, Terraria.GameContent.Biomes.DunesBiome.DunesDescription.IsValid, Microsoft.Xna.Framework.Rectangle.Left, Terraria.GameContent.Biomes.DunesBiome.DunesDescription.Surface, Microsoft.Xna.Framework.Rectangle.Width, Microsoft.Xna.Framework.Point.X, and Microsoft.Xna.Framework.Point.Y.

Referenced by Terraria.GameContent.Biomes.DunesBiome.Place().