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(){