[]关于环形进度条,进度不能重置问题

我无法把画面重新弄到进度为0的时候,clear方法没用
QQ截图20170807095525.png
已邀请:

cuixueying

赞同来自: gls_laybox

var IndexView = (function(_super){

this.angle;
this.draw;
this.box;
this.circle;

function IndexView(){
IndexView.super(this);
this.angle = 0;
Laya.timer.loop(200,this,this.loadProgress)
var Sprite = Laya.Sprite;
this.box = new Sprite();
this.box.cacheAs = "bitmap";
this.box.pos(0,0);
this.say.addChild(this.box);
this.draw = new Sprite();
this.box.addChild(this.draw);
this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, this.say.width/2+9,0,this.angle, "#ffffff");
this.circle = new Sprite();
this.circle.graphics.drawCircle(this.say.width/2, this.say.height/2, this.say.width/2, "#00ffff");
this.circle.blendMode = "destination-out";

}
Laya.class(IndexView,"IndexView",_super);

IndexView.prototype.loadProgress = function(){
this.box.addChild(this.circle);
if(this.angle <= 360){
this.angle+=12;
this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, this.say.width/2+9,0,this.angle, "#ffffff");
}else{
this.draw.graphics.clear();
this.circle.graphics.clear();
}
}

return IndexView;

}

)(IndexUI);
关于clear的问题是你自己的逻辑问题导致的,按照上面的改下即可,锯齿是webGL的问题,我们正在解决,尽快修复!

gls_laybox

赞同来自:

还有个问题,就是绘制出的圆有锯齿,这个怎么抗锯齿

要回复问题请先

商务合作
商务合作