Exemple #1
0
 private void CheckPad(MyPad pad, MyBall ball)
 {
     if (pad.CheckInter(ball))
     {
         ball.velo.Y = -2;
     }
 }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            pad    = new MyPad();
            ball   = new MyBall();
            blocks = new MyBlock[5, 2];
            for (int j = 0; j < 2; j++)
            {
                for (int i = 0; i < 5; i++)
                {
                    blocks[i, j] = new MyBlock();
                }
            }

            this.ResetPosition();

            timer1.Start();
        }