コード例 #1
0
 /// <summary>
 /// when the angle is changed on the form the current tanks aim is changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void angleUpDown_ValueChanged(object sender, EventArgs e)
 {
     currentTank.Aim((float)angleUpDown.Value);
     // update the tank graphics to match the angle of the barrel of tank
     DrawGameplay();
     //refresh the screen
     displayPanel.Invalidate();
     currentTank.Paint(gameplayGraphics.Graphics, displayPanel.Size);
 }