J2ME中的 GAME API介绍[19]

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

本文简介:

       mainHeight = getHeight();

      

       //判断是否使用预览模式窗口

       //根据显示设备,设置合适的最大区和显示视野

       this.xViewWindow = 0;

       if(WORLD_WIDTH > mainWidth){

           //现有设备不能容纳所有游戏区域

           userViewWindow = true;

           this.wViewWindow = mainWidth;

       }else{

           //现有设备可以容纳所有游戏区域

           this.wViewWindow = WORLD_WIDTH;

       }

      

       this.yViewWindow = 0;

       if(WORLD_HEIGHT > mainHeight){

           userViewWindow = true;

           this.hViewWindow = mainHeight;

       }else{

           this.hViewWindow = WORLD_HEIGHT;

       }

      

       //设定图层显示方式

       if(userViewWindow){

           this.layerManager.setViewWindow(xViewWindow, yViewWindow, wViewWindow, hViewWindow);

       }

   }

  

   protected void clearData(){

      

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

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

go top