this._currentMap = new eui.Component();
this.addChild(this._currentMap);
this._currentMap.x = this._currentMap.y = 0;
this._currentMap.skinName = clazz;
this._currentMap.touchEnabled = false;
this._currentMap.touchChildren = false;
if (!this._mask) {
this._mask = new egret.Shape();
this._mask.graphics.beginFill(0xff0000);
this._mask.graphics.drawRect(this._currentMap.x, P2World.ins.wallTopProy, StageUtils.ins().getWidth(), P2World.ins.wallBottomProy - P2World.ins.wallTopProy);
this._mask.graphics.endFill();
this.addChild(this._mask);
}
this._currentMap.mask = this._mask;
代码加上mask之后,必定掉帧,具体原因,有空之后需要再研究