示例#1
0
    // Return a list of neighbouring tiles we can move to based on our current position, and our roll
    private List <HexTile> HighlightMoves()
    {
        List <HexTile> neighbours = activeTile.FindNeighbours(roll);

        foreach (HexTile neighbour in neighbours)
        {
            if (!neighbour.isActive)
            {
                neighbour.gameObject.GetComponentInChildren <MeshRenderer>().material.color = Color.black;
            }
        }

        return(neighbours);
    }