关于微信小游戏的加载进度条

目前在做微信小游戏,想要做个加载进度条,但是实现不出效果来,我采用的是以下的代码
cc.loader.onProgress = (completedCount: number, totalCount: number, item: any) => {
this.progress = completedCount / totalCount;
console.log(this.progress);
if (this.loadingProgressBar) {
this.loadingProgressBar.progress = this.progress;
}
};
这里一个是onProgress方法会报错,显示不存在该属性,另外一个是用了下面的代码会有反应,但是进度一直都是1
想请问一下大家是怎么实现微信小游戏的加载进度条的

手动置顶求回复

1赞