private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Right) { RightMove.Start(); } if (e.KeyCode == Keys.Left) { LeftMove.Start(); } if (e.KeyCode == Keys.Up) { UpMove.Start(); } if (e.KeyCode == Keys.Down) { DownMove.Start(); } if (e.KeyCode == Keys.Space) { if (canFire == true) { lasers[0].Location = new Point(player.Location.X + 20, player.Location.Y - 0); MoveLaser.Start(); } } }
private void Form1_KeyDown(object sender, KeyEventArgs e) { MainPlayer.Image = RotateImage((Bitmap)imgMainPlayer[1], angle); if (e.KeyCode == Keys.Left) { LeftRotate.Start(); } if (e.KeyCode == Keys.Right) { RightRotate.Start(); } if (e.KeyCode == Keys.Up) { UpMove.Start(); } if (e.KeyCode == Keys.Down) { DownMove.Start(); } }