Commit 4b250249 authored by wjf's avatar wjf

l

parent fbaef7a4
......@@ -10191,7 +10191,7 @@ exports.ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1595819916/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1595853182/resource/"
};
......@@ -11587,7 +11587,7 @@ var Tools = (function () {
resolve(true);
}
else {
reject();
resolve(false);
}
});
});
......@@ -17332,11 +17332,14 @@ var StartPanel = (function (_super) {
};
StartPanel.prototype.startGame = function () {
var _this = this;
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
this.enableMouseEvt(true);
return;
}
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
_this.enableMouseEvt(true);
if (!success)
return;
Tools_1.Tools.gameData.power = res.data.power;
......@@ -17490,11 +17493,14 @@ var StartPanelPrize = (function (_super) {
};
StartPanelPrize.prototype.startGame = function () {
var _this = this;
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
this.enableMouseEvt(true);
return;
}
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
_this.enableMouseEvt(true);
if (!success)
return;
Tools_1.Tools.gameData.power = res.data.power;
......@@ -17918,7 +17924,7 @@ var SuccessPrizePanel = (function (_super) {
};
SuccessPrizePanel.prototype.goPrize = function () {
ctrls_1.changeScene(LotteryScene_1.LotteryScene, { level: this.data.level });
this.hidePanel();
_super.prototype.hidePanel.call(this);
};
SuccessPrizePanel.prototype.hidePanel = function () {
ctrls_1.changeScene(MapScene_1.MapScene);
......@@ -18700,6 +18706,11 @@ var PrizeItem = (function (_super) {
_this.prizeImage = _this.addChild(new FYGE.Sprite());
_this.prizeImage.width = _this.prizeImage.height = 101;
_this.prizeImage.position.set(4, 4);
var mask = _this.addChild(new FYGE.Shape());
mask.beginFill(0);
mask.drawRoundedRect(4, 4, 101, 101, 10);
mask.endFill();
_this.prizeImage.mask = mask;
_this.nameTxt = _this.addChild(Tools_1.Tools.getText("", 19.23, "#317f7f", FYGE.TEXT_ALIGN.CENTER, 109, 0, 112));
return _this;
}
......@@ -21768,9 +21779,14 @@ var MapScene = (function (_super) {
Tools_1.Tools.gameData.loginAddPower = false;
}
var openPrize = GTool_1.GTool.readCache('openPrize');
if (Tools_1.Tools.gameData.topAward && Tools_1.Tools.gameData.topAward._id && openPrize !== 'true') {
if (Tools_1.Tools.gameData.topAward.openPrizeStatus && openPrize !== 'true') {
GTool_1.GTool.writeCache('openPrize', 'true');
ctrls_1.showPanel(PrizePanel_1.PrizePanel, JSON.parse(JSON.stringify(Tools_1.Tools.gameData.topAward)));
if (Tools_1.Tools.gameData.topAward.prize && Tools_1.Tools.gameData.topAward.prize._id) {
ctrls_1.showPanel(PrizePanel_1.PrizePanel, JSON.parse(JSON.stringify(Tools_1.Tools.gameData.topAward.prize)));
}
else {
console.log('弹没奖的弹窗');
}
Tools_1.Tools.gameData.topAward = null;
}
};
This diff is collapsed.
......@@ -7,13 +7,15 @@ const options = {
square: false,
allowRotation: true,
tag: false,
border: 5
border: 2
}; // Set packing options
let packer = new MaxRectsPacker(4096, 4096, 2, options); // width, height, padding, options
let packer = new MaxRectsPacker(1024, 1024, 2, options); // width, height, padding, options
// console.log(packer.options)
let input = [ // any object with width & height is OK since v2.1.0
{width: 600, height: 20, name: "tree"},
{width: 600, height: 20, name: "flower"},
{width: 20, height: 600, name: "flower"},
// {width: 600, height: 20, name: "tree"},
// {width: 20, height: 600, name: "flower"},
// {width: 2000, height: 2000, name: "oversized background"},
// {width: 1000, height: 1000, name: "background"},
// {width: 1000, height: 1000, name: "overlay"}
......@@ -21,13 +23,16 @@ let input = [ // any object with width & height is OK since v2.1.0
packer.addArray(input); // Start packing with input array
// packer.next(); // Start a new packer bin
packer.addArray(input.slice()); // Adding to the new bin
packer.addArray([ {width: 600, height: 20, name: "tree"},
{width: 20, height: 600, name: "flower"},]); // Adding to the new bin
// packer.addArray(input.slice());
// packer.addArray(input.slice());
packer.bins.forEach(bin => {
// console.log(bin.rects);
console.log(bin.rects);
});
// Reuse packer
// let bins = packer.save();
// packer.load(bins);
console.log(packer.bins)
// console.log(packer.bins)
// packer.addArray(input);
\ No newline at end of file
......@@ -8398,5 +8398,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1595819916/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/1595853182/resource/"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment