J2ME中的 GAME API介绍[32]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

       }

      

       //在缓冲区重画

       this.layerManager.paint(g, 0, (getHeight() - WORLD_HEIGHT) / 2);

       this.flushGraphics();

   }

 

  

   public void commandAction(Command command, Displayable display) {

       if(command == startCommand){

          

           if(this.gameState == GAME_OVER){

               gameState = GAME_INIT;

           }else{

               gameState = GAME_RUN;

           }

          

           this.removeCommand(this.startCommand);

           this.addCommand(pauseCommand);

          

       }else if(command == pauseCommand){

           gameState = GAME_PAUSE;

          

           this.removeCommand(this.pauseCommand);

           this.addCommand(startCommand);

          

       }else if(command == exitCommand){

           gameState = GAME_OVER;

          

       }

本文关键:J2ME中的 GAME API介绍
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top