Example #1
0
    // Create empty hexes adjacents to hex (if not already created).
    public void CreateEmptyAdjacentHexes(Vector2 centerHexCoord)
    {
        foreach (Vector2 adjHexCoord in HexUtil.GetAdjacentCoords(centerHexCoord))
        {
            // If the hex already exists, then do nothing.
            if (hexagons.ContainsKey(adjHexCoord))
            {
                continue;
            }

            CreateHex(adjHexCoord);
        }
    }