Пример #1
0
    GraphicEntity1 AddRect(int width, int height, Color color, bool allowStacking = false)
    {
        GridRect emptyRect = board.FindEmptyRectWithSize(width, height);

        if (emptyRect == null && allowStacking)
        {
            emptyRect = board.FindRandomRectWithSize(width, height);
        }
        if (emptyRect != null)
        {
            var ge = GraphicEntity1.New(emptyRect, board);
            ge.SetColor(color);
            //ge.SetOpacity(opacity, Beat(1));
            return(ge);
        }
        return(null);
    }