如图设置图片的Type 为FILLED ,FillType 为RADIAL ,FillCenter(图片扇形中心)为cc.p(0.5,0.5) ,FillStart(开始部分)为0.25(最高点开始)
注:yuanxing为拖进去的图片节点
//圆形滚动条
_yuangundontiao:function(){this.yuanxing.getComponent(cc.Sprite).fillRange = 1
this._jindutiaotime(100)
},
_jindutiaotime:function(time){
var self = this
if(time > 0){
this.scheduleOnce(function() {
cc.log(time)
self.yuanxing.getComponent(cc.Sprite).fillRange = time/100
self._jindutiaotime(--time)
}, 0.1);
}
else {
this.yuanxing.getComponent(cc.Sprite).fillRange = time/30
cc.log("时间到")
}
},