}
}
if (showSpaces) {
for (int i=0;i<navMesh.getSpaceCount();i++) {
Space space = navMesh.getSpace(i);
if (builder.clear(dataMap, space)) {
g.setColor(new Color(1,1,0,0.5f));
g.fillRect(space.getX()*10, space.getY()*10, space.getWidth()*10, space.getHeight()*10);
}
g.setColor(Color.yellow);
g.drawRect(space.getX()*10, space.getY()*10, space.getWidth()*10, space.getHeight()*10);
if (showLinks) {
int links = space.getLinkCount();
for (int j=0;j<links;j++) {
Link link = space.getLink(j);
g.setColor(Color.red);
g.fillRect((link.getX()*10)-2, (link.getY()*10)-2,5,5);
}
}
}