示例#1
0
 private void UpdatePosition()
 {
     if (Keyboard.IsKeyDown(Key.A))
     {
         tankController.TurnLeft();
     }
     if (Keyboard.IsKeyDown(Key.D))
     {
         tankController.TurnRight();
     }
     if (Keyboard.IsKeyDown(Key.W))
     {
         tankController.MoveForward();
     }
     if (Keyboard.IsKeyDown(Key.S))
     {
         tankController.MoveBackward();
     }
 }