资 源 简 介
public void action(){MouseAdapter l = new MouseAdapter() {@Overridepublic void mouseMoved(MouseEvent e) {hero.moveTo(e.getX(), e.getY());}};this.addMouseListener(l);this.addMouseMotionListener(l);Timer timer=new Timer();timer.schedule(new TimerTask() {@Overridepublic void run() {stepAction();enemyEnterAction();bulletEnterAction();repaint();}}, 10,10);}