Пример #1
0
 /** 开启游戏 */
 public void startGame(MyIO io) {
   if (io.isApplet() == false) {
     try {
       setCursor(
           Toolkit.getDefaultToolkit()
               .createCustomCursor(
                   Toolkit.getDefaultToolkit().getImage(""), new Point(0, 0), "invisible"));
     } catch (Exception e) {
     }
   }
   m_game = new GameWorld(this, io);
   m_game.start();
 }
Пример #2
0
 /** 停止游戏 */
 public void stopGame() {
   m_game.stop();
   m_game = null;
   repaint();
 }
Пример #3
0
 @Override
 public void actionPerformed(ActionEvent e) {
   gameWorld.setSound(!gameWorld.getSound());
   System.out.println(
       "Sound Command From " + e.getActionCommand() + " " + e.getSource().getClass());
 }