完善热更新

This commit is contained in:
leo
2018-06-01 14:57:59 +08:00
parent acd1bbca07
commit 7462d276db
95 changed files with 2809 additions and 40 deletions

View File

@@ -13,10 +13,28 @@ cc.Class({
// use this for initialization
onLoad: function () {
this.label.string = this.text;
this.hotUpdateScript = this.node.getComponent('HotUpdate');
this.hotUpdateScript.init(this.onHotUpdateFinish.bind(this));
},
//热更新完成
onHotUpdateFinish() {
console.log('onHotUpdateFinish');
},
//查看进度
onHotUpdateProgess(byteProgess, fileProgess) {
console.log(byteProgess, fileProgess);
},
onHotUpdateFailure(type) {
console.log('type=', type);
},
// called every frame
update: function (dt) {
},
});
});