Exemplo n.º 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();
 }
Exemplo n.º 2
0
 /** 停止游戏 */
 public void stopGame() {
   m_game.stop();
   m_game = null;
   repaint();
 }
Exemplo n.º 3
0
 @Override
 public void actionPerformed(ActionEvent e) {
   gameWorld.setSound(!gameWorld.getSound());
   System.out.println(
       "Sound Command From " + e.getActionCommand() + " " + e.getSource().getClass());
 }