Ejemplo n.º 1
0
        public void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Left)
            {
                racket.MoveToLeft();
            }

            if (e.KeyCode == Keys.Right)
            {
                racket.MoveToRight();
            }

            if (e.KeyCode == Keys.P)
            {
                this.timer1.Enabled = false;
            }

            if (e.KeyCode == Keys.R)
            {
                this.timer1.Enabled = true;
            }

            if (e.KeyCode == Keys.L)
            {
                this.timer1.Interval = 41;
            }

            if (e.KeyCode == Keys.M)
            {
                this.timer1.Interval = 21;
            }

            if (e.KeyCode == Keys.H)
            {
                this.timer1.Interval = 1;
            }
        }