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

◆ PlaceHill()

static void Terraria.GameContent.Biomes.DunesBiome.PlaceHill ( int startX,
int endX,
double scale,
DunesDescription description )
inlinestaticprivate

Definition at line 89 of file DunesBiome.cs.

90 {
91 Point startPoint = new Point(startX, description.Surface[startX]);
92 Point endPoint = new Point(endX, description.Surface[endX]);
93 Point point = new Point((startPoint.X + endPoint.X) / 2, (startPoint.Y + endPoint.Y) / 2 - (int)(35.0 * scale));
94 int num = (endPoint.X - point.X) / 4;
95 int minValue = (endPoint.X - point.X) / 16;
96 if (description.WindDirection == WindDirection.Left)
97 {
98 point.X -= WorldGen.genRand.Next(minValue, num + 1);
99 }
100 else
101 {
102 point.X += WorldGen.genRand.Next(minValue, num + 1);
103 }
104 Point point2 = new Point(0, (int)(scale * 12.0));
105 Point point3 = new Point(point2.X / -2, point2.Y / -2);
106 PlaceCurvedLine(startPoint, point, (description.WindDirection != 0) ? point3 : point2, description);
107 PlaceCurvedLine(point, endPoint, (description.WindDirection == WindDirection.Left) ? point3 : point2, description);
108 }
static void PlaceCurvedLine(Point startPoint, Point endPoint, Point anchorOffset, DunesDescription description)

References Terraria.WorldGen.genRand, Terraria.GameContent.Biomes.DunesBiome.PlaceCurvedLine(), Terraria.GameContent.Biomes.DunesBiome.DunesDescription.Surface, Terraria.GameContent.Biomes.DunesBiome.DunesDescription.WindDirection, Microsoft.Xna.Framework.Point.X, and Microsoft.Xna.Framework.Point.Y.

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