コード例 #1
0
ファイル: HexGridManager.cs プロジェクト: jglouis/Hexode
    // 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);
        }
    }