Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王剑峰
babycare_xiaoxiao
Commits
4b250249
Commit
4b250249
authored
Jul 28, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
fbaef7a4
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
14 deletions
+35
-14
output.js
output.js
+21
-5
output.js.map
output.js.map
+1
-1
aaa.js
scripts/aaa.js
+12
-7
ResJson.ts
src/ResJson.ts
+1
-1
No files found.
output.js
View file @
4b250249
...
@@ -10191,7 +10191,7 @@ exports.ResJson = {
...
@@ -10191,7 +10191,7 @@ exports.ResJson = {
}
}
}
}
],
],
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/15958
19916
/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/15958
53182
/resource/"
};
};
...
@@ -11587,7 +11587,7 @@ var Tools = (function () {
...
@@ -11587,7 +11587,7 @@ var Tools = (function () {
resolve(true);
resolve(true);
}
}
else {
else {
re
ject(
);
re
solve(false
);
}
}
});
});
});
});
...
@@ -17332,11 +17332,14 @@ var StartPanel = (function (_super) {
...
@@ -17332,11 +17332,14 @@ var StartPanel = (function (_super) {
};
};
StartPanel.prototype.startGame = function () {
StartPanel.prototype.startGame = function () {
var _this = this;
var _this = this;
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
this.enableMouseEvt(true);
return;
return;
}
}
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
_this.enableMouseEvt(true);
if (!success)
if (!success)
return;
return;
Tools_1.Tools.gameData.power = res.data.power;
Tools_1.Tools.gameData.power = res.data.power;
...
@@ -17490,11 +17493,14 @@ var StartPanelPrize = (function (_super) {
...
@@ -17490,11 +17493,14 @@ var StartPanelPrize = (function (_super) {
};
};
StartPanelPrize.prototype.startGame = function () {
StartPanelPrize.prototype.startGame = function () {
var _this = this;
var _this = this;
this.enableMouseEvt(false);
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
if (!this.data.isPlayed && Tools_1.Tools.gameData.power <= 0) {
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
ctrls_1.showPanel(NoEnergyPanel_1.NoEnergyPanel);
this.enableMouseEvt(true);
return;
return;
}
}
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.dojoin, { level: this.data.level }, function (success, res) {
_this.enableMouseEvt(true);
if (!success)
if (!success)
return;
return;
Tools_1.Tools.gameData.power = res.data.power;
Tools_1.Tools.gameData.power = res.data.power;
...
@@ -17918,7 +17924,7 @@ var SuccessPrizePanel = (function (_super) {
...
@@ -17918,7 +17924,7 @@ var SuccessPrizePanel = (function (_super) {
};
};
SuccessPrizePanel.prototype.goPrize = function () {
SuccessPrizePanel.prototype.goPrize = function () {
ctrls_1.changeScene(LotteryScene_1.LotteryScene, { level: this.data.level });
ctrls_1.changeScene(LotteryScene_1.LotteryScene, { level: this.data.level });
this.hidePanel(
);
_super.prototype.hidePanel.call(this
);
};
};
SuccessPrizePanel.prototype.hidePanel = function () {
SuccessPrizePanel.prototype.hidePanel = function () {
ctrls_1.changeScene(MapScene_1.MapScene);
ctrls_1.changeScene(MapScene_1.MapScene);
...
@@ -18700,6 +18706,11 @@ var PrizeItem = (function (_super) {
...
@@ -18700,6 +18706,11 @@ var PrizeItem = (function (_super) {
_this.prizeImage = _this.addChild(new FYGE.Sprite());
_this.prizeImage = _this.addChild(new FYGE.Sprite());
_this.prizeImage.width = _this.prizeImage.height = 101;
_this.prizeImage.width = _this.prizeImage.height = 101;
_this.prizeImage.position.set(4, 4);
_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));
_this.nameTxt = _this.addChild(Tools_1.Tools.getText("", 19.23, "#317f7f", FYGE.TEXT_ALIGN.CENTER, 109, 0, 112));
return _this;
return _this;
}
}
...
@@ -21768,9 +21779,14 @@ var MapScene = (function (_super) {
...
@@ -21768,9 +21779,14 @@ var MapScene = (function (_super) {
Tools_1.Tools.gameData.loginAddPower = false;
Tools_1.Tools.gameData.loginAddPower = false;
}
}
var openPrize = GTool_1.GTool.readCache('openPrize');
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');
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;
Tools_1.Tools.gameData.topAward = null;
}
}
};
};
output.js.map
View file @
4b250249
This diff is collapsed.
Click to expand it.
scripts/aaa.js
View file @
4b250249
...
@@ -7,13 +7,15 @@ const options = {
...
@@ -7,13 +7,15 @@ const options = {
square
:
false
,
square
:
false
,
allowRotation
:
true
,
allowRotation
:
true
,
tag
:
false
,
tag
:
false
,
border
:
5
border
:
2
};
// Set packing options
};
// 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
let
input
=
[
// any object with width & height is OK since v2.1.0
{
width
:
600
,
height
:
20
,
name
:
"tree"
},
{
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: 2000, height: 2000, name: "oversized background"},
// {width: 1000, height: 1000, name: "background"},
// {width: 1000, height: 1000, name: "background"},
// {width: 1000, height: 1000, name: "overlay"}
// {width: 1000, height: 1000, name: "overlay"}
...
@@ -21,13 +23,16 @@ let input = [ // any object with width & height is OK since v2.1.0
...
@@ -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
.
addArray
(
input
);
// Start packing with input array
// packer.next(); // Start a new packer bin
// 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
=>
{
packer
.
bins
.
forEach
(
bin
=>
{
//
console.log(bin.rects);
console
.
log
(
bin
.
rects
);
});
});
// Reuse packer
// Reuse packer
// let bins = packer.save();
// let bins = packer.save();
// packer.load(bins);
// packer.load(bins);
console
.
log
(
packer
.
bins
)
//
console.log(packer.bins)
// packer.addArray(input);
// packer.addArray(input);
\ No newline at end of file
src/ResJson.ts
View file @
4b250249
...
@@ -8398,5 +8398,5 @@ export const ResJson = {
...
@@ -8398,5 +8398,5 @@ export const ResJson = {
}
}
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/15958
19916
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/babycare_xiaoxiao/15958
53182
/resource/"
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment