- level generation refactoring: moved most of the generation logic to a static GaveGenerator class + some minor cleanup

- WIP method for splitting the voronoi cells to smaller ones and carving a small cave through them
This commit is contained in:
Regalis
2016-04-02 16:03:41 +03:00
parent 2a2ba80f9c
commit 39c9c78266
7 changed files with 745 additions and 557 deletions
+12
View File
@@ -972,6 +972,18 @@ namespace Voronoi2
return true;
}
public List<GraphEdge> MakeVoronoiGraph(List<Vector2> sites, float minX, float minY, float maxX, float maxY)
{
double[] xVal = new double[sites.Count];
double[] yVal = new double[sites.Count];
for (int i = 0; i < sites.Count; i++)
{
xVal[i] = sites[i].X;
yVal[i] = sites[i].Y;
}
return generateVoronoi(xVal, yVal, minX, maxX, minY, maxY);
}
public List<GraphEdge> MakeVoronoiGraph(List<Vector2> sites, int width, int height)
{
double[] xVal = new double[sites.Count];