示例#1
0
 public void keyPressd(KeyEvent e) {
   switch (e.getKeyCode()) {
     case KeyEvent.VK_UP:
       bu = true;
       break;
     case KeyEvent.VK_DOWN:
       bd = true;
       break;
     case KeyEvent.VK_LEFT:
       bl = true;
       break;
     case KeyEvent.VK_RIGHT:
       br = true;
       break;
     case KeyEvent.VK_CONTROL:
       tc.myMissile = fire();
       break;
     default:
       break;
   }
 }
示例#2
0
  public static void main(String[] args) {

    TankClient tc = new TankClient();
    tc.launchFrame();
  }