|
|
@@ -370,6 +370,7 @@ gData.gameData.setFarmDataMap(this.curConfigID, t, !1);
|
|
|
var e = gData.gameData.getFarmDataMap(this.curConfigID + 1);
|
|
|
e.state = r.FarmState.CanUnlock;
|
|
|
gData.gameData.setFarmDataMap(this.curConfigID + 1, e);
|
|
|
+mk.tip.pop("拓建农田成功");
|
|
|
} else gData.gameData.setFarmDataMap(this.curConfigID, t);
|
|
|
gData.gameData.setNextProduct();
|
|
|
};
|
|
|
@@ -418,9 +419,9 @@ mk.ad.videoAdType = r.VideoAdType.video_init_11;
|
|
|
mk.ad.watchAd(function(e) {
|
|
|
mk.console.log("watchAD:" + e);
|
|
|
if (e) {
|
|
|
+mk.ui.closePanel(t.node.name);
|
|
|
gData.adData.watchVideo(null);
|
|
|
gData.adUnlockData.unlockFarm();
|
|
|
-mk.ui.closePanel(t.node.name);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
@@ -2712,6 +2713,7 @@ t[t.bigCash = 6] = "bigCash";
|
|
|
t[t.cashOutNoviceWelfare = 7] = "cashOutNoviceWelfare";
|
|
|
t[t.cashOutAddCash = 8] = "cashOutAddCash";
|
|
|
t[t.harvest = 9] = "harvest";
|
|
|
+t[t.farmMap = 10] = "farmMap";
|
|
|
})(i = o.AdFun || (o.AdFun = {}));
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
@@ -9139,7 +9141,7 @@ done: !0
|
|
|
Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
-var s = t("../../data/GameData"), l = cc._decorator, p = l.ccclass, u = l.property, d = function(t) {
|
|
|
+var s = t("../../data/AdData"), l = t("../../data/GameData"), p = cc._decorator, u = p.ccclass, d = p.property, h = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
@@ -9158,13 +9160,13 @@ this.InitUI(t);
|
|
|
};
|
|
|
e.prototype.InitUI = function(t) {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var e, o, n, a, i, r, l, p;
|
|
|
+var e, o, n, a, i, r, s, p;
|
|
|
return c(this, function(c) {
|
|
|
switch (c.label) {
|
|
|
case 0:
|
|
|
this.data = t;
|
|
|
e = "";
|
|
|
-e = gData.farmMapData.chooseType == s.ProductType.nzw ? "game/coregame/texture/plant_icons/plantIcon_" : "game/coregame/texture/factory_icons/factory_";
|
|
|
+e = gData.farmMapData.chooseType == l.ProductType.nzw ? "game/coregame/texture/plant_icons/plantIcon_" : "game/coregame/texture/factory_icons/factory_";
|
|
|
o = gData.farmMapData.maxUnluckValue;
|
|
|
if (!(t.picture <= o)) return [ 3, 2 ];
|
|
|
n = this.sp_icon;
|
|
|
@@ -9197,8 +9199,8 @@ case 3:
|
|
|
a.spriteFrame = c.sent();
|
|
|
i = gData.gameData.getProductMakeTimesById(t.picture - 1);
|
|
|
r = gData.gameData.getProductMap(t.picture - 1).name;
|
|
|
-l = this.getDesByType();
|
|
|
-this.lbl_des.string = "" + l + this.data.value + "次" + r + "后解锁\n(" + i + "/" + t.value + ")";
|
|
|
+s = this.getDesByType();
|
|
|
+this.lbl_des.string = "" + s + this.data.value + "次" + r + "后解锁\n(" + i + "/" + t.value + ")";
|
|
|
this.node_getBtn.active = !1;
|
|
|
this.node_ungetBtn.active = !1;
|
|
|
this.node_unluckBtn.active = !0;
|
|
|
@@ -9297,10 +9299,10 @@ return t;
|
|
|
e.prototype.clickUnGetRewardBtn = function() {
|
|
|
var t = this;
|
|
|
mk.audio.playEffect("button");
|
|
|
-mk.ad.videoAdType = s.VideoAdType.video_init_6;
|
|
|
+mk.ad.videoAdType = l.VideoAdType.video_init_6;
|
|
|
mk.ad.watchAd(function(e) {
|
|
|
if (e) {
|
|
|
-gData.adData.watchVideo(null);
|
|
|
+gData.adData.watchVideo(s.AdFun.farmMap);
|
|
|
gData.farmMapData.isStateChange = !0;
|
|
|
t.node_getBtn.active = !0;
|
|
|
t.node_ungetBtn.active = !1;
|
|
|
@@ -9318,39 +9320,40 @@ e.prototype.clickGetRewardBtn = function() {
|
|
|
mk.audio.playEffect("button");
|
|
|
mk.tip.pop("已领取");
|
|
|
};
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "图标",
|
|
|
type: cc.Sprite
|
|
|
}) ], e.prototype, "sp_icon", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "名字描述",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_nameDes", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "描述",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_des", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "领奖按钮",
|
|
|
type: cc.Node
|
|
|
}) ], e.prototype, "node_ungetBtn", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "已领奖按钮",
|
|
|
type: cc.Node
|
|
|
}) ], e.prototype, "node_getBtn", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "未解锁按钮",
|
|
|
type: cc.Node
|
|
|
}) ], e.prototype, "node_unluckBtn", void 0);
|
|
|
-i([ u({
|
|
|
+i([ d({
|
|
|
displayName: "红点",
|
|
|
type: cc.Node
|
|
|
}) ], e.prototype, "node_redPoint", void 0);
|
|
|
-return i([ p ], e);
|
|
|
+return i([ u ], e);
|
|
|
}(cc.Component);
|
|
|
-o.default = d;
|
|
|
+o.default = h;
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
+"../../data/AdData": "AdData",
|
|
|
"../../data/GameData": "GameData"
|
|
|
} ],
|
|
|
FarmMapData: [ function(t, e, o) {
|
|
|
@@ -9381,9 +9384,14 @@ function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
e.chooseType = r.ProductType.nzw;
|
|
|
e.isStateChange = !1;
|
|
|
+e.init_award = !1;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.init = function() {};
|
|
|
+e.prototype.setAdData = function(e) {
|
|
|
+t.prototype.setAdData.call(this, e);
|
|
|
+this.init_award = !0;
|
|
|
+};
|
|
|
e.prototype.setChooseType = function(t) {
|
|
|
this.chooseType = t;
|
|
|
this.maxUnluckValue = gData.gameData.getMaxProduct(t);
|
|
|
@@ -9481,6 +9489,11 @@ if (gData.farmMapData.isStateChange) {
|
|
|
this.refreshBtnState();
|
|
|
gData.farmMapData.isStateChange = !1;
|
|
|
}
|
|
|
+if (gData.farmMapData.init_award) {
|
|
|
+gData.farmMapData.init_award = !1;
|
|
|
+gData.reward.data = gData.farmMapData.adData;
|
|
|
+mk.ui.openPanel("module/reward/reward");
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.getIndex = function(t) {
|
|
|
var e = {
|
|
|
@@ -10461,10 +10474,10 @@ l.angle = mk.math.random(-45, 45, !1);
|
|
|
d = (d = cc.v2(mk.math.random(-1, 1, !1), mk.math.random(-1, 1, !1))).normalize();
|
|
|
h = cc.v2(mk.math.random(10, 160, !1) * d.x, mk.math.random(10, 160, !1) * d.y);
|
|
|
f = new cc.Vec2(0, -300);
|
|
|
-if (o) f = this.node.convertToNodeSpaceAR(o); else {
|
|
|
+if (o instanceof cc.Node) {
|
|
|
g = (y = o).parent.convertToWorldSpaceAR(y.getPosition());
|
|
|
f = this.node.convertToNodeSpaceAR(g);
|
|
|
-}
|
|
|
+} else f = this.node.convertToNodeSpaceAR(o);
|
|
|
m = f.add(h);
|
|
|
l.setPosition(f);
|
|
|
this.FlyIn(t, l, m, n, a, s);
|
|
|
@@ -11099,7 +11112,7 @@ Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
o.Fun = void 0;
|
|
|
-var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), k = t("./module/SettingData"), P = t("./module/GuideData"), O = t("./module/GuideWeakData"), I = t("./ConfigData"), R = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), N = t("../../before/main/FarmSystem"), x = t("../../before/view/data/HarvestData"), F = t("../../before/view/data/ADClearSickData"), j = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), G = t("./module/LineUpUIData"), U = function() {
|
|
|
+var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), k = t("./module/SettingData"), P = t("./module/GuideData"), O = t("./module/GuideWeakData"), I = t("./ConfigData"), R = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), x = t("../../before/main/FarmSystem"), N = t("../../before/view/data/HarvestData"), F = t("../../before/view/data/ADClearSickData"), j = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = t("./module/WalletCashOutData"), G = t("./module/LineUpUIData"), U = function() {
|
|
|
function t() {
|
|
|
this.init();
|
|
|
}
|
|
|
@@ -11132,11 +11145,11 @@ this.redeem = new S.default();
|
|
|
this.newCashUiData = new R.NewCashUIData();
|
|
|
this.adUnlockData = new T.default();
|
|
|
this.plantData = new C.default();
|
|
|
-this.harvestData = new x.default();
|
|
|
+this.harvestData = new N.default();
|
|
|
this.adClearSickData = new F.default();
|
|
|
this.pastureSystem = new j.default();
|
|
|
this.factorySystem = new M.default();
|
|
|
-this.farmSystem = new N.FarmSystem();
|
|
|
+this.farmSystem = new x.FarmSystem();
|
|
|
this.farmMapData = new B.FarmMapData();
|
|
|
this.farmGradeData = new L.GradeRewardData();
|
|
|
this.walletCashOutData = new E.WalletCashOutData();
|
|
|
@@ -11770,7 +11783,6 @@ break;
|
|
|
|
|
|
case 1:
|
|
|
gData.farmSystem.btnMake();
|
|
|
-gData.gameData.nextMake = null;
|
|
|
this.nextMake = null;
|
|
|
this.setNextProduct(!1);
|
|
|
gData.adData.checkPopRed();
|
|
|
@@ -11779,7 +11791,6 @@ break;
|
|
|
|
|
|
case 2:
|
|
|
gData.pastureSystem.btnMake();
|
|
|
-gData.gameData.nextMake = null;
|
|
|
this.nextMake = null;
|
|
|
this.setNextProduct(!1);
|
|
|
gData.adData.checkPopRed();
|
|
|
@@ -11788,7 +11799,6 @@ break;
|
|
|
|
|
|
case 3:
|
|
|
gData.factorySystem.btnMake();
|
|
|
-gData.gameData.nextMake = null;
|
|
|
this.nextMake = null;
|
|
|
this.setNextProduct(!1);
|
|
|
gData.adData.checkPopRed();
|
|
|
@@ -12276,6 +12286,7 @@ t[t.unlock = 3] = "unlock";
|
|
|
t[t.redBag = 1] = "redBag";
|
|
|
t[t.rmb = 2] = "rmb";
|
|
|
t[t.pigRmb = 3] = "pigRmb";
|
|
|
+t[t.productTimes = 4] = "productTimes";
|
|
|
})(o.RewardType || (o.RewardType = {}));
|
|
|
(function(t) {
|
|
|
t.bgm = "bgm";
|
|
|
@@ -12725,9 +12736,6 @@ return e;
|
|
|
e.prototype.onLoad = function() {
|
|
|
this.ani_add.node.active = !1;
|
|
|
gData.gameData.gameStyle = this;
|
|
|
-mk.ui.closePanel("login", function() {
|
|
|
-mk.ui.closePanel("agreementTip");
|
|
|
-});
|
|
|
this.span = 6e4 * gData.gameData.ProductionRecovery;
|
|
|
gData.gameData.checkGradeUpUnLock();
|
|
|
this.loadMain();
|
|
|
@@ -12955,7 +12963,7 @@ e.prototype.onClickPlant = function() {
|
|
|
if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (gData.gameData.isProducting) mk.tip.pop("点击太快了"); else {
|
|
|
gData.gameData.makeProduct();
|
|
|
var t = this.node_taskHb.parent.convertToWorldSpaceAR(this.node_taskHb.getPosition());
|
|
|
-mk.fly.PlayCoinAnim(4, 3, this.btn_product, t, function() {
|
|
|
+mk.fly.PlayCoinAnim(1, 3, this.btn_product, t, function() {
|
|
|
gData.gameData.init_task = !0;
|
|
|
}, 1);
|
|
|
}
|
|
|
@@ -14859,7 +14867,7 @@ return [ 2 ];
|
|
|
e.prototype.update = function() {
|
|
|
if (gData.harvestData.init_reward) {
|
|
|
gData.harvestData.init_reward = !1;
|
|
|
-gData.reward.data = gData.harvestData.adData;
|
|
|
+gData.reward.adData = gData.harvestData.adData;
|
|
|
gData.reward.callback = gData.harvestData.call;
|
|
|
mk.ui.openPanel("module/reward/reward");
|
|
|
}
|
|
|
@@ -16872,7 +16880,7 @@ mk.ui.openPanel("module/login/agreementTip");
|
|
|
mk.storage.setStorage("agreementTip", 1, !1);
|
|
|
} else {
|
|
|
var t = cc.find("Canvas/主界面层");
|
|
|
-mk.ui.openPanel("game/prefab/game", p.OpenActionType.normal, t);
|
|
|
+mk.ui.openPanel("game/prefab/game", p.OpenActionType.closeOther, t);
|
|
|
console.log("===[Jsbsystem 显示开屏广告================================");
|
|
|
mk.ad.ifShowAd && l.default.showSplash();
|
|
|
}
|
|
|
@@ -20695,8 +20703,9 @@ return [ 2 ];
|
|
|
});
|
|
|
};
|
|
|
e.prototype.clickMake = function() {
|
|
|
-if (this.data.tab == l.ProductType.nzw) {
|
|
|
+if (gData.gameData.leftTimes <= 0) mk.ui.openPanel("module/speedUpUI/productReward"); else if (this.data.tab == l.ProductType.nzw) {
|
|
|
gData.farmSystem.plant(this.data.picture);
|
|
|
+gData.gameData.nextMake = null;
|
|
|
gData.farmSystem.selectNextFarm(!1);
|
|
|
} else gData.factorySystem.make(this.data.picture);
|
|
|
};
|
|
|
@@ -21267,16 +21276,26 @@ mk.guide.open(4);
|
|
|
this.lbl_times.string = "生产次数x" + gData.gameData.configs.ServerConfig.ProductionAd;
|
|
|
};
|
|
|
e.prototype.clickVideoBtn = function() {
|
|
|
+var t = this;
|
|
|
mk.audio.playEffect("button");
|
|
|
mk.ui.closePanel(this.node.name);
|
|
|
mk.ad.videoAdType = r.VideoAdType.video_init_16;
|
|
|
-mk.ad.watchAd(function(t) {
|
|
|
-if (t) {
|
|
|
+mk.ad.watchAd(function(e) {
|
|
|
+if (e) {
|
|
|
gData.adData.watchVideo(null);
|
|
|
-gData.gameData.changeLeftTimes(parseInt(gData.gameData.configs.ServerConfig.ProductionAd));
|
|
|
+var o = [ {
|
|
|
+rewardType: 4,
|
|
|
+rewardNum: parseInt(gData.gameData.configs.ServerConfig.ProductionAd)
|
|
|
+} ];
|
|
|
+gData.reward.data = o;
|
|
|
+gData.reward.callback = t.addTimes;
|
|
|
+mk.ui.openPanel("module/reward/reward");
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
+e.prototype.addTimes = function() {
|
|
|
+gData.gameData.changeLeftTimes(parseInt(gData.gameData.configs.ServerConfig.ProductionAd));
|
|
|
+};
|
|
|
e.prototype.clickCloseBtn = function() {
|
|
|
mk.audio.playEffect("closeButton");
|
|
|
mk.ui.closePanel(this.node.name);
|
|
|
@@ -22707,7 +22726,6 @@ return e;
|
|
|
}
|
|
|
e.prototype.start = function() {
|
|
|
this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
-this.isShowNewTask = gData.gameData.init_redBagTask;
|
|
|
if (this.isShowNewTask) this.showNewTaskUI(); else {
|
|
|
this.initTaskProgressUI();
|
|
|
this.showChangePart();
|
|
|
@@ -22765,7 +22783,7 @@ y: 6
|
|
|
}).start();
|
|
|
e.node_value.active = !0;
|
|
|
e.node_value.scale = 0;
|
|
|
-cc.tween(e.node_value).to(.76, {
|
|
|
+cc.tween(e.node_value).to(.5, {
|
|
|
scale: 1.3
|
|
|
}, cc.easeSineOut()).to(.1, {
|
|
|
scale: 1
|
|
|
@@ -22794,7 +22812,7 @@ t.lbl_taskProgress.string = e.toFixed(0) + "%";
|
|
|
}).start();
|
|
|
cc.tween(this);
|
|
|
this.lbl_taskNum.string = o.toString();
|
|
|
-this.lbl_taskDes.string = "完成 次收获,领取红包(" + e + "/" + o + ")";
|
|
|
+this.lbl_taskDes.string = "(" + e + "/" + o + ")";
|
|
|
var a = this.openBtn_ani.getComponent(l.default);
|
|
|
if (a && e < o) {
|
|
|
a.setGray(!0);
|
|
|
@@ -22846,6 +22864,10 @@ if (0 != e.errcode) return [ 2, null ];
|
|
|
gData.gameData.gameData.userFarmTaskInfo = e.data.userFarmTaskInfo;
|
|
|
gData.gameData.init_redBagTask = !0;
|
|
|
gData.gameData.init_task = !0;
|
|
|
+this.maxNum = gData.gameData.gameData.userFarmTaskInfo.taskCount;
|
|
|
+this.num = 0;
|
|
|
+this.delayTime = 0;
|
|
|
+this.times = 0;
|
|
|
this.showNewTaskUI();
|
|
|
this.isShowNewTask = !0;
|
|
|
gData.receiptNotice.receip_rmb = e.data.cashMoney;
|
|
|
@@ -23613,7 +23635,7 @@ gData.reward.data = [];
|
|
|
e.prototype.flyCoinAnim = function(t) {
|
|
|
var e = this;
|
|
|
void 0 === t && (t = null);
|
|
|
-if (gData.reward.data && gData.reward.data.length) for (var o = gData.reward.data.length, n = 0; n < o; n++) gData.reward.data[n].rewardType !== r.RewardType.rmb && 0 != gData.reward.data[n].rewardNum && mk.fly.PlayCoinAnim(gData.reward.data[n].rewardType, 10, t, "", function() {
|
|
|
+if (gData.reward.data && gData.reward.data.length) for (var o = gData.reward.data.length, n = 0; n < o; n++) gData.reward.data[n].rewardType !== r.RewardType.rmb && gData.reward.data[n].rewardType !== r.RewardType.productTimes && 0 != gData.reward.data[n].rewardNum && mk.fly.PlayCoinAnim(gData.reward.data[n].rewardType, 10, t, "", function() {
|
|
|
e.addReward();
|
|
|
});
|
|
|
};
|
|
|
@@ -23762,25 +23784,16 @@ done: !0
|
|
|
Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
-var s, l = t("../../data/AdData"), p = t("../../data/GameData"), u = cc._decorator, d = u.ccclass, h = u.property;
|
|
|
+var s, l = t("../../data/GameData"), p = cc._decorator, u = p.ccclass, d = p.property;
|
|
|
(function(t) {
|
|
|
t[t.none = 0] = "none";
|
|
|
t[t.luck = 1] = "luck";
|
|
|
t[t.mission = 2] = "mission";
|
|
|
})(s || (s = {}));
|
|
|
-var f = function(t) {
|
|
|
+var h = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
-e.lid_type = s.none;
|
|
|
-e.node_luck = null;
|
|
|
-e.node_mission = null;
|
|
|
-e.anim_open_redbag = null;
|
|
|
-e.btn_watch_video = null;
|
|
|
-e.node_coin = null;
|
|
|
-e.lbl_reward_value = null;
|
|
|
-e.hb_star = null;
|
|
|
-e.btn_close = null;
|
|
|
e.spr_cash_out = null;
|
|
|
e.lbl_cash_out = null;
|
|
|
e.lbl_cash = null;
|
|
|
@@ -23792,17 +23805,15 @@ e.cur_stage = s.none;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.onLoad = function() {
|
|
|
-this.hb_star.active = !1;
|
|
|
-this.lbl_reward_value.string = "0";
|
|
|
this.lbl_reward_num.string = "x0";
|
|
|
+this.watchVideoCall();
|
|
|
};
|
|
|
e.prototype.start = function() {
|
|
|
-this.initLid();
|
|
|
this.initCashOutStyle(gData.gameData.gameData.redMoney);
|
|
|
};
|
|
|
e.prototype.onEnable = function() {
|
|
|
-gData.adData.checkPopInter(p.InterAdType.interstitial1_click_2);
|
|
|
-mk.ad.showBanner(p.BannerAdType.banner_click_1);
|
|
|
+gData.adData.checkPopInter(l.InterAdType.interstitial1_click_2);
|
|
|
+mk.ad.showBanner(l.BannerAdType.banner_click_1);
|
|
|
};
|
|
|
e.prototype.onDisable = function() {
|
|
|
mk.ad.destoryBanner();
|
|
|
@@ -23815,26 +23826,6 @@ e.prototype.lateUpdate = function() {
|
|
|
gData.reward.add_redbag_value = 0;
|
|
|
gData.reward.adData = null;
|
|
|
};
|
|
|
-e.prototype.initLid = function() {
|
|
|
-if (this.lid_type === s.none) {
|
|
|
-this.node_luck.active = !1;
|
|
|
-this.node_mission.active = !1;
|
|
|
-this.btn_watch_video.node.active = !1;
|
|
|
-this.watchVideoCall();
|
|
|
-} else if (this.lid_type === s.luck) {
|
|
|
-this.node_luck.active = !0;
|
|
|
-this.node_mission.active = !1;
|
|
|
-this.btn_watch_video.node.active = !0;
|
|
|
-this.cur_stage = s.luck;
|
|
|
-mk.audio.playEffect("reward");
|
|
|
-} else if (this.lid_type === s.mission) {
|
|
|
-this.node_luck.active = !1;
|
|
|
-this.node_mission.active = !0;
|
|
|
-this.btn_watch_video.node.active = !0;
|
|
|
-this.cur_stage = s.mission;
|
|
|
-mk.audio.playEffect("reward");
|
|
|
-}
|
|
|
-};
|
|
|
e.prototype.initCashOutStyle = function(t) {
|
|
|
void 0 === t && (t = 0);
|
|
|
var e = gData.redBagCash.cash_bar, o = gData.redBagCash.getItemDataByIndex(e);
|
|
|
@@ -23849,85 +23840,29 @@ fillRange: a
|
|
|
t >= o.redMoney ? this.node_cash.play() : this.node_cash.stop();
|
|
|
}
|
|
|
};
|
|
|
-e.prototype.clickWatchVideo = function() {
|
|
|
-return r(this, void 0, void 0, function() {
|
|
|
-var t;
|
|
|
-return c(this, function(e) {
|
|
|
-switch (e.label) {
|
|
|
-case 0:
|
|
|
-cc.log("看广告请求");
|
|
|
-if (!gData.gameData.gameData.isFirstRedMoney) return [ 3, 2 ];
|
|
|
-gData.gameData.gameData.isFirstRedMoney = 0;
|
|
|
-return [ 4, mk.http.sendData("getFreeRedMoney", {}) ];
|
|
|
-
|
|
|
-case 1:
|
|
|
-if (0 != (t = e.sent()).errcode) {
|
|
|
-mk.tip.pop(t.errmsg);
|
|
|
-return [ 2 ];
|
|
|
-}
|
|
|
-gData.reward.adData = {};
|
|
|
-gData.reward.adData.videoRedMoney = {};
|
|
|
-gData.reward.adData.videoRedMoney.videoRewardList = [ {
|
|
|
-rewardType: p.RewardType.redBag,
|
|
|
-rewardNum: t.data.freeRedMoney
|
|
|
-} ];
|
|
|
-return [ 2 ];
|
|
|
-
|
|
|
-case 2:
|
|
|
-this.lid_type === s.mission ? mk.ad.watchAd(function(t) {
|
|
|
-mk.console.log("watchAD:" + t);
|
|
|
-t && gData.adData.watchVideo(l.AdFun.settlement);
|
|
|
-}) : mk.ad.watchAd(function(t) {
|
|
|
-mk.console.log("watchAD:" + t);
|
|
|
-t && gData.adData.watchVideo(2 === gData.reward.subType ? l.AdFun.checkpoint : l.AdFun.bubble);
|
|
|
-});
|
|
|
-return [ 2 ];
|
|
|
-}
|
|
|
-});
|
|
|
-});
|
|
|
-};
|
|
|
e.prototype.watchVideoCall = function() {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var t, e, o, n, a, i;
|
|
|
-return c(this, function(r) {
|
|
|
-switch (r.label) {
|
|
|
+var t, e, o, n, a;
|
|
|
+return c(this, function(i) {
|
|
|
+switch (i.label) {
|
|
|
case 0:
|
|
|
gData.reward.adData && (gData.reward.data = gData.reward.adData.videoRedMoney.videoRewardList);
|
|
|
if (!gData.reward.data || !gData.reward.data.length) return [ 2 ];
|
|
|
-this.btn_close && (this.btn_close.active = !1);
|
|
|
this.cur_stage = s.none;
|
|
|
-if ((t = gData.reward.data.length) >= 2) for (e = 0; e < t; e++) if (gData.reward.data[e].rewardType === p.RewardType.redBag) {
|
|
|
+if ((t = gData.reward.data.length) >= 2) for (e = 0; e < t; e++) if (gData.reward.data[e].rewardType === l.RewardType.redBag) {
|
|
|
o = gData.reward.data.splice(e, 1);
|
|
|
gData.reward.data.unshift(o[0]);
|
|
|
break;
|
|
|
}
|
|
|
-if (gData.reward.data[0].rewardType !== p.RewardType.redBag) return [ 3, 2 ];
|
|
|
-n = this.node_coin;
|
|
|
-return [ 4, mk.loader.load("game/texture/coin/" + p.RewardType.redBag, cc.SpriteFrame) ];
|
|
|
-
|
|
|
-case 1:
|
|
|
-n.spriteFrame = r.sent();
|
|
|
-return [ 3, 4 ];
|
|
|
-
|
|
|
-case 2:
|
|
|
-a = this.node_coin;
|
|
|
+n = this.node_hb;
|
|
|
return [ 4, mk.loader.load("game/texture/coin/" + gData.reward.data[0].rewardType, cc.SpriteFrame) ];
|
|
|
|
|
|
-case 3:
|
|
|
-a.spriteFrame = r.sent();
|
|
|
-r.label = 4;
|
|
|
-
|
|
|
-case 4:
|
|
|
-i = gData.reward.data[0].rewardNum || 0;
|
|
|
-if (gData.reward.data[0].rewardType === p.RewardType.pigRmb) this.lbl_reward_value.string = (i / 100).toFixed(2) + "元"; else {
|
|
|
-this.lbl_reward_value.string = "" + i;
|
|
|
-this.lbl_reward_num.string = "x" + i;
|
|
|
-}
|
|
|
-this.anim_open_redbag.play();
|
|
|
-this.node_luck.active = !1;
|
|
|
-this.node_mission.active = !1;
|
|
|
-this.btn_watch_video.node.active = !1;
|
|
|
-gData.reward.data[0].rewardType === p.RewardType.redBag && (gData.reward.add_redbag_value = gData.reward.data[0].rewardNum);
|
|
|
+case 1:
|
|
|
+n.spriteFrame = i.sent();
|
|
|
+gData.reward.data[0].rewardType === l.RewardType.productTimes ? this.node_hb.node.scale = .5 : this.node_hb.node.scale = 1;
|
|
|
+a = gData.reward.data[0].rewardNum || 0;
|
|
|
+gData.reward.data[0].rewardType === l.RewardType.pigRmb || (this.lbl_reward_num.string = "x" + a);
|
|
|
+gData.reward.data[0].rewardType === l.RewardType.redBag && (gData.reward.add_redbag_value = gData.reward.data[0].rewardNum);
|
|
|
return [ 2 ];
|
|
|
}
|
|
|
});
|
|
|
@@ -23935,14 +23870,14 @@ return [ 2 ];
|
|
|
};
|
|
|
e.prototype.clickGetReward = function() {
|
|
|
cc.log("获取奖励:", gData.reward.data);
|
|
|
-var t = this.node_hb.parent.convertToWorldSpaceAR(this.node_hb.getPosition());
|
|
|
+var t = this.node_hb.node.parent.convertToWorldSpaceAR(this.node_hb.node.getPosition());
|
|
|
gData.reward.flyCoinAnim(t);
|
|
|
if (gData.reward.callback) {
|
|
|
gData.reward.callback();
|
|
|
gData.reward.callback = null;
|
|
|
}
|
|
|
this.onClickClose();
|
|
|
-0 == gData.gameData.getProp(p.GameProp.videoTimes) && mk.data.sendXYEvent("guide_receive", "新手引导领取2500红包币");
|
|
|
+0 == gData.gameData.getProp(l.GameProp.videoTimes) && mk.data.sendXYEvent("guide_receive", "新手引导领取2500红包币");
|
|
|
};
|
|
|
e.prototype.clickCashOut = function() {
|
|
|
gData.reward.addReward();
|
|
|
@@ -23955,77 +23890,39 @@ this.cur_stage === s.none && mk.audio.playEffect("closeButton");
|
|
|
e.prototype.onClickClose = function() {
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
-i([ h({
|
|
|
-displayName: "红包类型",
|
|
|
-type: cc.Enum(s),
|
|
|
-tooltip: "none无类型,luck幸运红包,mission通关红包"
|
|
|
-}) ], e.prototype, "lid_type", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "幸运红包",
|
|
|
-type: cc.Node
|
|
|
-}) ], e.prototype, "node_luck", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "通关红包",
|
|
|
-type: cc.Node
|
|
|
-}) ], e.prototype, "node_mission", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "开红包动画",
|
|
|
-type: cc.Animation
|
|
|
-}) ], e.prototype, "anim_open_redbag", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "按钮看视频",
|
|
|
-type: cc.Button
|
|
|
-}) ], e.prototype, "btn_watch_video", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "货币图标",
|
|
|
-type: cc.Sprite
|
|
|
-}) ], e.prototype, "node_coin", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "奖励数量",
|
|
|
-type: cc.Label
|
|
|
-}) ], e.prototype, "lbl_reward_value", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "星星闪闪效果",
|
|
|
-type: cc.Node
|
|
|
-}) ], e.prototype, "hb_star", void 0);
|
|
|
-i([ h({
|
|
|
-displayName: "关闭按钮",
|
|
|
-type: cc.Node
|
|
|
-}) ], e.prototype, "btn_close", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "spr提现进度",
|
|
|
type: cc.Sprite
|
|
|
}) ], e.prototype, "spr_cash_out", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "lbl提现进度",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_cash_out", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "提现金额",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_cash", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "提现按钮",
|
|
|
type: cc.Animation
|
|
|
}) ], e.prototype, "node_cash", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "新红包节点",
|
|
|
type: cc.Node
|
|
|
}) ], e.prototype, "node_newRedBag", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "新红包奖励数量",
|
|
|
type: cc.Label
|
|
|
}) ], e.prototype, "lbl_reward_num", void 0);
|
|
|
-i([ h({
|
|
|
+i([ d({
|
|
|
displayName: "红包节点",
|
|
|
-type: cc.Node
|
|
|
+type: cc.Sprite
|
|
|
}) ], e.prototype, "node_hb", void 0);
|
|
|
-return i([ d ], e);
|
|
|
+return i([ u ], e);
|
|
|
}(cc.Component);
|
|
|
-o.default = f;
|
|
|
+o.default = h;
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
-"../../data/AdData": "AdData",
|
|
|
"../../data/GameData": "GameData"
|
|
|
} ],
|
|
|
RopeSwung: [ function(t, e, o) {
|
|
|
@@ -28594,8 +28491,8 @@ a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
e.panelParent = null;
|
|
|
-e.isPanelOpening = !1;
|
|
|
-e.isPanelClosing = !1;
|
|
|
+e.isPanelOpeningArr = [];
|
|
|
+e.isPanelClosingArr = [];
|
|
|
e.curOnPanelDic = {};
|
|
|
e.lastOpenPanelName = "";
|
|
|
return e;
|
|
|
@@ -28610,8 +28507,8 @@ e.prototype.openPanel = function(t, e, o) {
|
|
|
void 0 === e && (e = r.normal);
|
|
|
void 0 === o && (o = null);
|
|
|
var n = t.split("/"), a = n[n.length - 1], i = this;
|
|
|
-if (!i.isPanelOpening && !i.getCurOnPanel(a)) {
|
|
|
-i.isPanelOpening = !0;
|
|
|
+if (-1 == i.isPanelOpeningArr.indexOf(a) && !i.getCurOnPanel(a)) {
|
|
|
+i.isPanelOpeningArr.push(a);
|
|
|
return new Promise(function(n, c) {
|
|
|
mk.loader.load("" + t, cc.Prefab).then(function(t) {
|
|
|
var c = cc.instantiate(t);
|
|
|
@@ -28628,20 +28525,25 @@ i.lastOpenPanelName && i.closePanel(i.lastOpenPanelName);
|
|
|
break;
|
|
|
|
|
|
case r.closeOther:
|
|
|
-for (var s = Object.keys(i.curOnPanelDic).filter(function() {}), l = 0; l < s.length; l++) {
|
|
|
+for (var s = Object.keys(i.curOnPanelDic).filter(function(t) {
|
|
|
+return t != a;
|
|
|
+}), l = 0; l < s.length; l++) {
|
|
|
var p = s[l];
|
|
|
i.closePanel(p);
|
|
|
}
|
|
|
}
|
|
|
i.lastOpenPanelName = a;
|
|
|
n(c);
|
|
|
-i.isPanelOpening = !1;
|
|
|
+var u = i.isPanelOpeningArr.indexOf(a);
|
|
|
+i.isPanelOpeningArr.splice(u, 1);
|
|
|
} else {
|
|
|
console.error("[UISystem] UI的父节点panelParent为null,请检查脚本挂载情况");
|
|
|
-i.isPanelOpening = !1;
|
|
|
+var d = i.isPanelOpeningArr.indexOf(a);
|
|
|
+i.isPanelOpeningArr.splice(d, 1);
|
|
|
}
|
|
|
}).catch(function(t) {
|
|
|
-i.isPanelOpening = !1;
|
|
|
+var e = i.isPanelOpeningArr.indexOf(a);
|
|
|
+i.isPanelOpeningArr.splice(e, 1);
|
|
|
c(t);
|
|
|
});
|
|
|
});
|
|
|
@@ -28652,10 +28554,10 @@ return this.curOnPanelDic[t];
|
|
|
};
|
|
|
e.prototype.closePanel = function(t, e) {
|
|
|
void 0 === e && (e = null);
|
|
|
-if (!this.isPanelClosing && this.getCurOnPanel(t)) {
|
|
|
-this.isPanelClosing = !0;
|
|
|
+if (-1 == this.isPanelClosingArr.indexOf(t) && this.getCurOnPanel(t)) {
|
|
|
+this.isPanelClosingArr.push(t);
|
|
|
var o = this.getCurOnPanel(t), n = o.getComponent("EffectOpenAndClose");
|
|
|
-n ? n.hideEffect(this.destroyNode.bind(this, o, t, e)) : this.destroyNode(o, t, e);
|
|
|
+n && n.isOpenCloseEffect ? n.hideEffect(this.destroyNode.bind(this, o, t, e)) : this.destroyNode(o, t, e);
|
|
|
mk.event.emit("close-panel", t);
|
|
|
}
|
|
|
};
|
|
|
@@ -28663,7 +28565,8 @@ e.prototype.destroyNode = function(t, e, o) {
|
|
|
void 0 === o && (o = null);
|
|
|
t.destroy();
|
|
|
delete this.curOnPanelDic[e];
|
|
|
-this.isPanelClosing = !1;
|
|
|
+var n = this.isPanelClosingArr.indexOf(e);
|
|
|
+this.isPanelClosingArr.splice(n, 1);
|
|
|
o && o();
|
|
|
};
|
|
|
e.prototype.closeAllUI = function(t) {
|
|
|
@@ -28673,7 +28576,6 @@ var o = this.getCurOnPanel(e), n = o.getComponent("EffectOpenAndClose");
|
|
|
n ? n.hideEffect(this.destroyNode.bind(this, o, e)) : this.destroyNode(o, e);
|
|
|
mk.event.emit("close-panel", e);
|
|
|
}
|
|
|
-this.isPanelClosing = !1;
|
|
|
mk.ad.destroyNativeAd();
|
|
|
mk.ad.destoryBanner();
|
|
|
};
|
|
|
@@ -30422,7 +30324,6 @@ a(e, t);
|
|
|
function e() {
|
|
|
return null !== t && t.apply(this, arguments) || this;
|
|
|
}
|
|
|
-e.prototype.start = function() {};
|
|
|
e.prototype.clickRule = function(t) {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
return c(this, function() {
|
|
|
@@ -30431,12 +30332,9 @@ return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
-e.prototype.clickClose = function() {
|
|
|
-mk.ui.closePanel(this.node.name);
|
|
|
-};
|
|
|
e.prototype.clickAgree = function() {
|
|
|
var t = cc.find("Canvas/主界面层");
|
|
|
-mk.ui.openPanel("game/prefab/game", s.OpenActionType.normal, t);
|
|
|
+mk.ui.openPanel("game/prefab/game", s.OpenActionType.closeOther, t);
|
|
|
};
|
|
|
return i([ p ], e);
|
|
|
}(cc.Component));
|