//监测运行时,以便及时运行垃圾回收
rt = Runtime.getRuntime();
startCommand = new Command("Start", Command.OK, 1);
pauseCommand = new Command("Pause", Command.OK, 1);
exitCommand = new Command("Exit", Command.EXIT, 2);
//初始化其它类及图层
//初始化游戏状态
this.gameState = this.GAME_INIT; //游戏处于demo画面状态
//启动应用程序
threadAlive = true;
thread = new Thread(this);
thread.start();
}
/**
* 初始化地图数据 和 地图窗口显示方式
*/
private void init(){
//清理数据
this.clearData();
mainWidth = getWidth();