mySub = null;
mySub = new Sub(this, SubMIDlet.createImage("/res/sub.png"), getWidth() / 3, getHeight() / 3, layerManager);
}
//创建背景图层
this.createSandBackground();
this.createSunkenBoat();
this.createFishCollection(0, FishCollection.NUM_FISH_TYPES);
this.createMysub();
this.createSeaBackground();
mySub.setPosition(getWidth() / 3, getHeight() / 3);
gameState = GAME_RUN;
}else if(gameState == GAME_RUN){
//游戏处于运行状态
//提供游戏运行标识Flag,保证对用户操作的响应和"敌人"的运行动作只有在运行的时候生效
//在性能过耗(可用内存不到当前内存总量的4/5时),进行垃圾回收GC
if(rt.freeMemory() < (rt.totalMemory() * 4 / 5)){
rt.gc();
}