Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

Cc.loader.load 回调函数的问题。

$
0
0

@704436993 写道:

在_progressCallback回调函数中,参数 completedCount,totalcount是不是系统的参数?因为在范例里面没有看到有实参传进来。
cc.loader.load(this.urls, this.progressCallback.bind(this), this._completeCallback.bind(this));
},

_progressCallback: function (**completedCount**, **totalCount**, **res**) {
    this.progress = completedCount / totalCount;
    this.resource = res;
    this.completedCount = completedCount;
    this.totalCount = totalCount;
    console.log('in progress'+ this.completedCount);
},

_completeCallback: function (error, res) {
  console.log('completed');
},

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>