Ejemplo n.º 1
0
    protected void ChangeHexpointStateAroundPosition(Vector2Int pos, HexPoint.State state)
    {
        for (int i = 0; i < ExdMath.DIRECTION_SIX.Length; i++)
        {
            HexPoint p = controlBoard.GetPoint(pos + ExdMath.DIRECTION_SIX[i]);
            if (p == null)
            {
                continue;
            }

            if (state == HexPoint.State.CAN_BE_SELECT && p.edges[(i + 3) % 6] == 1)
            {
                continue;
            }

            p.ChangeStateTo(state);
        }
    }