/**
* 初始化 地图
*/
public function initMap(texture:Texture, bgID:int):void{
if(this.oldBgID != bgID){
oldBgID = bgID;
if(oldTexture){
oldTexture.destroy(true);
oldTexture = null;
}
oldTexture = texture;
}
if(texture){
this.mapImg.source = texture;
this.width = texture.width;
this.height = texture.height;
this.pos((Laya.stage.width - this.width)/2, (Laya.stage.height - this.height)/2);
}
}