laya官方没有环形倒计时的组件,我们现在自己制作一个:
首先,创建一个box,在box下添加一个img。img属于box的子项,
box的参数如下:
代码中:
this.mBox.mask = this.ttImg;
this.mBox.graphics.clear();
this.mBox.graphics.drawPie(86, 86, 86, 0, 360 - this._angle, "#ffff00", "#ffffcd")
this._angle += (360 / this._configData.challengeTime);