this.progressvalue = new Laya.Image("Game/bar_yuan.png");
this.progressvalue.anchorX = 0.5;
this.progressvalue.anchorY = 0.5;
this.progressvalue.pos(15, 15);
//记录宽度
this.width_x = this.progress.width + 3;
this.vmask = new Laya.Sprite();
this.vmask.pos(15,15);
this.vmask.graphics.drawPie(0, 0, 20, -90, 270, "#000000");
this.progress.addChild(this.progressvalue);
this.progressvalue.mask = this.vmask;
this.changevalue = function(value)
{
this.targetvalue = value;
target = parseInt(360 * value - 90);
this.vmask.graphics.clear();
if(target == -90){
//this.vmask.graphics.drawPie(0, 0, 20, -90, -90, "#000000");
this.vmask.graphics.drawPie(0, 0, 20, -90, -89, "#000000");
}else{
this.vmask.graphics.drawPie(0, 0, 20, -90, 0, "#000000");
}
}
上面这串代码,在target等于-90的时候,只要绘制的pie = -90或者选择不绘制,都会引起黑屏,请问是为什么?