Exemple #1
0
        public World()
        {
            InitializeComponent();
            KeyDown += MyKeyDown;
            KeyUp += MyKeyUp;

            label1.Text = "Press Space to start game";
            ball = new Ball(new Vector( -5, 5), pictureBox2, this);
            player1 = new Paddle(pictureBox3,this);
            player2 = new Paddle(pictureBox1,this);
        }
 public void checkCollision(Paddle paddle)
 {
     checkWallCollision();
     checkPaddleCollision(paddle);
 }
 public PingPongLogic(int height, int width)
 {
     paddle  = new Paddle(height, width);
     paddle2 = new Paddle(height, width);
     ball    = new Ball(height, width);
 }