public void Connect2(VGArea mAreaStart, VGArea mAreaEnd)
{
VGTile start = mAreaStart.GetRandomBorderTile();
VGTile end = mAreaEnd.GetRandomBorderTile();
start.Set(ValuePath, true);
end.Set(ValuePath, true);
Path path = PGPathfinder.FindPath(mAreaStart.World.WorldArea, start.Node, end.Node);
if (path == null) return;
List<PGNode> nodes = new List<PGNode>();
for (Path p = path; p != null; p = p.PreviousSteps)
nodes.Add(p.LastStep);
foreach (PGNode node in nodes)
{
node.Tile.Set(ValuePath);
//foreach (VGTile tile in mAreaStart.World.WorldArea.GetTileNeighbors(node.X, node.Y)) if (tile.Value == 0) tile.Set(ValueSolid, false);
}
}