|
|
@@ -5216,11 +5216,7 @@ s.getComponent(p.default).init();
|
|
|
var u = 2 + 2 * (r.default.Inst.cleanedVecArr.length - 2), y = l.default.Inst.getPoolPrefab(l.NODEPOOLPREFABTYPE.EliminateScore), g = this.node.x + r.default.Inst.node_content.x, m = this.node.y + r.default.Inst.node_content.y + 30;
|
|
|
y.getComponent(d.default).init(new cc.Vec2(g, m), u);
|
|
|
r.default.Inst.node_effectUI.addChild(y);
|
|
|
-if (t) {
|
|
|
-r.default.Inst.curGetScore += u;
|
|
|
-r.default.Inst.finalGetScore += u;
|
|
|
-r.default.Inst.initScore();
|
|
|
-} else {
|
|
|
+if (t) ; else {
|
|
|
var _ = l.default.Inst.getPoolPrefab(l.NODEPOOLPREFABTYPE.ScoreEnergy);
|
|
|
_.getComponent(h.default).init(g, m, u);
|
|
|
r.default.Inst.node_effectUI.addChild(_);
|
|
|
@@ -7409,7 +7405,7 @@ this.gameData.isWithdrawable = t.isWithdrawable;
|
|
|
this.gameData.lastTime = t.lastTime;
|
|
|
this.gameData.loginDays = t.loginDays;
|
|
|
this.gameData.newPlayer = t.newPlayer;
|
|
|
-this.gameData.piggyBank = t.piggyBank;
|
|
|
+this.gameData.initPiggyBank(t.piggyBank);
|
|
|
this.gameData.piggyBankCashTimes = t.piggyBankCashTimes;
|
|
|
this.gameData.redMoney = t.redMoney;
|
|
|
this.gameData.signInDay = t.signInDay;
|
|
|
@@ -7574,6 +7570,9 @@ gData.gameData.init_red_point = !0;
|
|
|
enumerable: !1,
|
|
|
configurable: !0
|
|
|
});
|
|
|
+t.prototype.initPiggyBank = function(t) {
|
|
|
+this._piggyBank = t;
|
|
|
+};
|
|
|
Object.defineProperty(t.prototype, "isWithdrawable", {
|
|
|
get: function() {
|
|
|
return this._isWithdrawable;
|
|
|
@@ -8076,7 +8075,7 @@ e.node_levelRedPacketUI = null;
|
|
|
e.node_touchListenMask = null;
|
|
|
e.curProgressScore = 0;
|
|
|
e.curGetScore = 0;
|
|
|
-e.targetScore = 1e5;
|
|
|
+e.targetScore = 0;
|
|
|
e.finalGetScore = 0;
|
|
|
e.addScoreSpeed = 4;
|
|
|
e.cellItemDic = {};
|
|
|
@@ -8211,9 +8210,6 @@ var t = this.curProgressScore + this.addScoreSpeed;
|
|
|
if (t >= n.Inst.targetScore) {
|
|
|
var e = s.default.Inst.getPoolPrefab(s.NODEPOOLPREFABTYPE.GetTargetScoreTip);
|
|
|
n.Inst.node_effectUI.addChild(e);
|
|
|
-gData.reward.subType = 2;
|
|
|
-mk.ad.videoAdType = y.VideoAdType.LevelScoreRedBag;
|
|
|
-mk.ui.openPanel("module/reward/rewardLuck");
|
|
|
}
|
|
|
this.curProgressScore = t;
|
|
|
this.curProgressScore >= this.curGetScore && (this.curProgressScore = this.curGetScore);
|
|
|
@@ -8248,10 +8244,12 @@ var t = gData.gameData.getProp(y.GameProp.levelNum);
|
|
|
this.label_level.string = "第" + (t + 1) + "关";
|
|
|
};
|
|
|
e.prototype.initTotalScore = function() {
|
|
|
+if (!this.targetScore) {
|
|
|
var t = gData.gameData.getProp(y.GameProp.levelNum);
|
|
|
this.targetScore = 450 + t * (5 + Math.floor(15 * Math.random()));
|
|
|
this.addScoreSpeed = 2 * Math.floor(this.targetScore / 200) + 4;
|
|
|
mk.console.log("this.addScoreSpeed", this.addScoreSpeed);
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.initScore = function() {
|
|
|
this.initProgress();
|
|
|
@@ -8260,6 +8258,11 @@ e.prototype.initProgress = function() {
|
|
|
var t = this.curProgressScore / this.targetScore;
|
|
|
t = t > 1 ? 1 : t;
|
|
|
this.spr_progress.fillRange = t;
|
|
|
+if (t >= 1) {
|
|
|
+gData.reward.subType = 2;
|
|
|
+mk.ad.videoAdType = y.VideoAdType.LevelScoreRedBag;
|
|
|
+mk.ui.getCurOnPanel("rewardLuck") || mk.ui.openPanel("module/reward/rewardLuck");
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.initPropNum = function() {
|
|
|
this.initHammerPropNum();
|
|
|
@@ -8553,14 +8556,13 @@ if (u.default.getAroundSameType(e.x, e.y, e.type, !1).length > 0) return;
|
|
|
}
|
|
|
this.pass();
|
|
|
};
|
|
|
-e.prototype.restart = function(t) {
|
|
|
-void 0 === t && (t = !1);
|
|
|
+e.prototype.restart = function() {
|
|
|
mk.console.log("restart!!!!!!!!!!!!!!!");
|
|
|
this.refreshGame();
|
|
|
};
|
|
|
-e.prototype.nextLevel = function(t) {
|
|
|
-void 0 === t && (t = !1);
|
|
|
+e.prototype.nextLevel = function() {
|
|
|
mk.console.log("nextLevel!!!!!!!!!!!!!!!");
|
|
|
+this.targetScore = 0;
|
|
|
this.refreshGame();
|
|
|
};
|
|
|
e.prototype.refreshGame = function() {
|
|
|
@@ -13717,11 +13719,12 @@ this.initEffectSwitchState();
|
|
|
e.prototype.onClickRestartBtn = function() {
|
|
|
r.default.Inst.restart();
|
|
|
mk.ui.closePanel(this.node.name);
|
|
|
+mk.ad.destroyNativeAd();
|
|
|
};
|
|
|
e.prototype.onClickExitBtn = function() {
|
|
|
c.default.Inst.sendEvent(c.UI_NAME.PauseUI, "点击退出按钮");
|
|
|
mk.ui.closePanel("PauseUI");
|
|
|
-r.default.Inst.restart(!1);
|
|
|
+r.default.Inst.restart();
|
|
|
r.default.Inst.node.active = !1;
|
|
|
mk.ad.destroyNativeAd();
|
|
|
};
|
|
|
@@ -21051,34 +21054,6 @@ if (a !== r) return a - r;
|
|
|
}
|
|
|
return o.length > n.length ? -1 : 0;
|
|
|
};
|
|
|
-t.checkHasApk = function(t) {
|
|
|
-var e = jsb.fileUtils.getWritablePath() + t;
|
|
|
-return jsb.fileUtils.isFileExist(e) ? e : "";
|
|
|
-};
|
|
|
-t.downFile2Local = function(t, e, n, o, i) {
|
|
|
-var a = jsb.fileUtils.getWritablePath() + e;
|
|
|
-if (jsb) {
|
|
|
-var r = new jsb.Downloader();
|
|
|
-r.setOnFileTaskSuccess(function() {
|
|
|
-console.log("DownLoadM setOnFileTaskSuccess", "");
|
|
|
-if (n) {
|
|
|
-console.log("DownLoadM result... ", jsb.fileUtils.isFileExist(a));
|
|
|
-console.log("DownLoadM setOnFileTaskSuccess fullPath...", a);
|
|
|
-n(a);
|
|
|
-}
|
|
|
-});
|
|
|
-r.setOnTaskError(function(t, e, n, i) {
|
|
|
-console.log("DownLoadM setOnTaskError", e + " ; " + n + " ; " + i);
|
|
|
-o && o(a);
|
|
|
-});
|
|
|
-r.setOnTaskProgress(function(t, e, n, o) {
|
|
|
-console.log("DownLoadM", e + " ; " + n + " ; " + o);
|
|
|
-i && i(e, n, o);
|
|
|
-});
|
|
|
-r.createDownloadFileTask(t, a);
|
|
|
-return r;
|
|
|
-}
|
|
|
-};
|
|
|
var e;
|
|
|
t._hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
|
return e = o([ a ], t);
|