for(int i = 0; i < numSunkenBoats; i++){
sunkenBoat = new Sprite(imageSunkenBoat, imageSunkenBoat.getWidth(), imageSunkenBoat.getHeight());
sunkenBoat.setTransform(this.rotations[SubMIDlet.createRandom(this.rotations.length)]);
//随机定义沉船位置
bx = (WORLD_WIDTH - imageSunkenBoat.getWidth()) / numSunkenBoats;
bx = (i * bx) + SubMIDlet.createRandom(bx);
sunkenBoat.setPosition(bx, WORLD_HEIGHT - imageSunkenBoat.getHeight());
//添加图层
this.layerManager.append(sunkenBoat);
//mySub.addCollideable(sunkenBoat);
}
imageSunkenBoat = null;
}
/**
* 创建玩家潜艇
*/
protected void createMysub(){
this.layerManager.append(mySub);
}
/**创建鱼群背景
* @param startId
* @param endId
*/