|
|
@@ -2254,6 +2254,7 @@ umid: "",
|
|
|
UA: ""
|
|
|
};
|
|
|
this.updateState = o.None;
|
|
|
+this.updatePercent = 0;
|
|
|
}
|
|
|
t.prototype.updateDeviceInfo = function(t) {
|
|
|
var e = t.split("#");
|
|
|
@@ -2284,7 +2285,8 @@ t[t.None = -1] = "None";
|
|
|
t[t.CheckForce = 0] = "CheckForce";
|
|
|
t[t.ForceUpdateFinish = 1] = "ForceUpdateFinish";
|
|
|
t[t.CheckHot = 2] = "CheckHot";
|
|
|
-t[t.UpdateFinish = 3] = "UpdateFinish";
|
|
|
+t[t.IsUpdate = 3] = "IsUpdate";
|
|
|
+t[t.UpdateFinish = 4] = "UpdateFinish";
|
|
|
})(o = n.UpdateState || (n.UpdateState = {}));
|
|
|
cc._RF.pop();
|
|
|
}, {} ],
|
|
|
@@ -10379,9 +10381,11 @@ t.local, t.server;
|
|
|
};
|
|
|
e.OnUpdateProgress = function(t) {
|
|
|
t.getDownloadedBytes(), t.getTotalBytes(), t.getDownloadedFiles(), t.getTotalFiles();
|
|
|
-var e = t.getPercentByFile().toFixed(2), n = (t.getPercent().toFixed(2), t.getMessage());
|
|
|
+var e = t.getPercentByFile().toFixed(2);
|
|
|
+t.getPercent().toFixed(2), t.getMessage();
|
|
|
+gData.appData.updateState = c.UpdateState.IsUpdate;
|
|
|
+gData.appData.updatePercent = parseFloat(e);
|
|
|
console.log("[update]: 进度=" + e);
|
|
|
-console.log(n);
|
|
|
};
|
|
|
e.OnNeedToUpdate = function() {
|
|
|
r.default.hotUpdate();
|
|
|
@@ -10391,9 +10395,14 @@ t.enterGame();
|
|
|
};
|
|
|
e.OnUpdateFailed = function() {
|
|
|
console.log("热更新失败");
|
|
|
+setTimeout(function() {
|
|
|
+r.default.checkUpdate();
|
|
|
+}, 2e3);
|
|
|
};
|
|
|
e.OnUpdateSucceed = function() {
|
|
|
console.log("更新成功");
|
|
|
+cc.audioEngine.stopAll();
|
|
|
+cc.game.restart();
|
|
|
};
|
|
|
r.default.init(this.manifest, e);
|
|
|
};
|
|
|
@@ -10565,7 +10574,7 @@ value: !0
|
|
|
n.ServerUrl = n.HttpData = void 0;
|
|
|
var o, i = function() {
|
|
|
function t() {
|
|
|
-this.serverType = 0;
|
|
|
+this.serverType = 1;
|
|
|
}
|
|
|
t.prototype.getServerUrl = function() {
|
|
|
switch (this.serverType) {
|
|
|
@@ -11124,7 +11133,7 @@ value: !0
|
|
|
n.LogTagColor = void 0;
|
|
|
var i, a = function() {
|
|
|
function t() {
|
|
|
-this.ifShowLog = !0;
|
|
|
+this.ifShowLog = !1;
|
|
|
this._tagChar = "...";
|
|
|
this._frontChar = " ";
|
|
|
this._keyValueChar = " = ";
|
|
|
@@ -11759,6 +11768,7 @@ if (gData.appData.updateState == p.UpdateState.ForceUpdateFinish) {
|
|
|
gData.appData.updateState = p.UpdateState.CheckHot;
|
|
|
this.checkHotUpdate();
|
|
|
}
|
|
|
+if (gData.appData.updateState != p.UpdateState.IsUpdate) {
|
|
|
if (gData.appData.updateState == p.UpdateState.UpdateFinish) {
|
|
|
if (this.process < 100) {
|
|
|
this.process += 2;
|
|
|
@@ -11781,6 +11791,10 @@ gData.gameData.dataFinish = !1;
|
|
|
}
|
|
|
} else gData.loginData.loadLocalRes();
|
|
|
}
|
|
|
+} else {
|
|
|
+this.lbl_progress.string = "正在更新中,请耐心等待";
|
|
|
+this.bar.setProgress(gData.appData.updatePercent);
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.setProgress = function(t) {
|
|
|
this.bar.setProgress(t);
|