Exemplo n.º 1
0
        public GameRunner(int width, int height)
        {
            Width = width;
            Height = height;

            _ball = new Ball(new Vector2(width / 2, height / 2), new Vector2(5, 5), 20.0f);
            _players[0] = new Paddle(Vector2.Empty, Vector2.Empty, 20, 80);
            _players[1] = new Paddle(new Vector2(width - 20, 0), Vector2.Empty, 20, 80);
        }
Exemplo n.º 2
0
 public void Draw(Paddle paddle)
 {
     _graphics.DrawRectangle(_blackPen, paddle.Location.X - paddle.Width / 2.0f, paddle.Location.Y - paddle.Height / 2.0f, paddle.Width, paddle.Height);
 }