Creator 设置圆形进度条
2016-09-14 10:51
176 查看
如图设置图片的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("时间到")
}
},
注: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("时间到")
}
},
相关文章推荐
- Android笔记: ProgressBar 圆形进度条颜色的设置
- Android透明圆形进度条对话框的设置
- ProgressBar 圆形进度条颜色的设置
- android圆形进度条ProgressBar颜色设置
- android圆形进度条ProgressBar颜色设置
- 圆形进度条,可设置内外环,多彩
- Android笔记: ProgressBar 圆形进度条颜色的设置
- android圆形进度条ProgressBar颜色设置
- 给ProgressBar 设置圆形进度条颜色
- Android编程之ProgressBar圆形进度条颜色设置方法
- Android圆形进度条颜色的设置
- android圆形进度条ProgressBar颜色设置
- 圆形进度条,可设置内外环,多彩
- Android学习札记6:ProgressBar圆形进度条的颜色设置
- 设置点击进度对话框外的区域对话框不消失
- ProgressBar 进度条颜色设置
- 在Installshield的安装进度中显示自己设置的信息
- 仿QQ注册圆形进度对话框...
- 自定义圆形进度ProgressBar的颜色和图片
- Flex的进度条(ProgressBar)控件中如何设置进度轨迹条和标签间竖直间隔间距的例子