Various improvements
This commit is contained in:
@ -144,10 +144,10 @@ namespace TransportGame.Generator
|
||||
|
||||
Polygon GeneratePrimitivePolygon(BuildingLot lot)
|
||||
{
|
||||
int sides = random.Next(3, 8); // Number of sides
|
||||
int sides = random.Next(3, 6); // Number of sides
|
||||
float angle = 2 * (float)Math.PI / sides; // Angle between sides
|
||||
|
||||
float radius = random.NextSingle(lot.Size * 0.25f, lot.Size * 0.75f) / 2; // Length of a side
|
||||
float radius = random.NextSingle(lot.Size * 0.15f, lot.Size * 0.4f); // Length of a side
|
||||
Vector2 current = lot.Position + new Vector2(random.NextSingle(-lot.Size / 4, lot.Size / 4), random.NextSingle(-lot.Size / 4, lot.Size / 4));
|
||||
Vector2 dir = new Vector2(random.NextSingle(), random.NextSingle()).Normalized * radius;
|
||||
|
||||
@ -185,7 +185,7 @@ namespace TransportGame.Generator
|
||||
}
|
||||
else
|
||||
{
|
||||
b.LevelHeights[i] = random.NextSingle(0, ConfigManager.Buildgen.MaxBuildingHeight);
|
||||
b.LevelHeights[i] = random.NextSingle(ConfigManager.Buildgen.MinBuildingHeight, ConfigManager.Buildgen.MaxBuildingHeight);
|
||||
}
|
||||
|
||||
for (int j = 0; j < random.Next(ConfigManager.Buildgen.MaxPolygonsPerLevel); j++)
|
||||
|
Reference in New Issue
Block a user