制作一个Loading界面的进度条时,想直接使用Sprite的FillRange相关内容实现,百分比的数据已经确认更新了,但是相关节点,求各位大佬帮忙看看问题出在哪里。update和star相关的代码如下:
start () {
this.loadingBarNode.fillType = cc.Sprite.FillType.HORIZONTAL; // this.loadingBarNode已经设置为cc.Sprite
this.loadingBarNode.fillStart = 0;
this.loadingBarNode.fillRange = 0;
},
update (dt) {
this.loadingBarNode.fillRange = this.loadPercent; //this.loadPercent 是预加载时更新的进度
console.log("update===>" + this.loadPercent)
},