private void DrawGUIIndexes(HexGrid grid) { foreach (HexCell cell in grid) { HandleUtils.CenteredLabel(cell.transform.position, cell.index.ToStringInt()); } }
void DrawGUINeighbours(HexCell cell) { if (cell.neighbours == null) { return; } var oldColor = Handles.color; Handles.color = Color.green; HandleUtils.CenteredLabel(cell.transform.position, cell.index.ToStringInt()); foreach (HexCell neighbour in cell.neighbours) { Handles.DrawLine(cell.transform.position, neighbour.transform.position); HandleUtils.CenteredLabel(neighbour.transform.position, neighbour.index.ToStringInt()); } Handles.color = oldColor; }