Creator 设置圆形进度条

    xiaoxiao2022-06-23  40

    如图设置图片的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("时间到")         }

        },

    转载请注明原文地址: https://ju.6miu.com/read-1123299.html

    最新回复(0)