mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-31 14:39:22 +08:00
完善热更新
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user