Exemplo n.º 1
0
        private void StartGame()
        {
            ball.SetInStartPosition(paddle.GetBounds());

            bricks = new Bricks[bricksWide, bricksHigh];

            for (int y = 0; y < bricksHigh; y++)
            {
                Color tint = Color.White;



                for (int x = 0; x < bricksWide; x++)
                {
                    bricks[x, y] = new Bricks(
                        brickImage,
                        new Rectangle(
                            x * brickImage.Width,
                            y * brickImage.Height,
                            brickImage.Width,
                            brickImage.Height),
                        tint);
                }
            }
        }