Exemplo n.º 1
0
 private void DrawGUIIndexes(HexGrid grid)
 {
     foreach (HexCell cell in grid)
     {
         HandleUtils.CenteredLabel(cell.transform.position, cell.index.ToStringInt());
     }
 }
Exemplo n.º 2
0
    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;
    }