Beispiel #1
0
 private void DrawPaddles()
 {
     for (int i = 0; i < 2; i++)
     {
         Display.FillRect(
             new Rectangle((int)paddle[i].X, (int)paddle[i].Y, paddleWidth, paddleHeight), paddleColor);
     }
 }
Beispiel #2
0
        private void DrawBorder()
        {
            Color borderColor = paddleColor;

            Display.FillRect(new Rectangle(0, 0, displayWidth, borderSize), borderColor);
            Display.FillRect(new Rectangle(0, 0, borderSize, displayHeight), borderColor);
            Display.FillRect(new Rectangle(0, displayHeight - borderSize, displayWidth, borderSize), borderColor);
            Display.FillRect(new Rectangle(displayWidth - borderSize, 0, borderSize, displayHeight), borderColor);
            Display.FillRect(new Rectangle(playAreaWidth - borderSize, 0, borderSize, displayHeight), borderColor);
        }
Beispiel #3
0
 private void DrawBall()
 {
     Display.FillRect(new Rectangle((int)ball.X, (int)ball.Y, ballSize, ballSize), ballColor);
 }