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
b73d38cd
Commit
b73d38cd
authored
Aug 03, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab2.dui88.com/MrKwon/babycare_xiaoxiao
parents
606d8e98
181d9dcd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
23 deletions
+43
-23
output.js
output.js
+17
-10
output.js.map
output.js.map
+1
-1
开奖按钮120.png
resource/SuccessPanel/开奖按钮120.png
+0
-0
star.png
resource/common/star.png
+0
-0
Tools.ts
src/Tools.ts
+24
-12
SuccessPrizePanel.ts
src/panels/SuccessPrizePanel.ts
+1
-0
No files found.
output.js
View file @
b73d38cd
...
...
@@ -11623,7 +11623,7 @@ var Tools = (function () {
if (!data.isVisitSuccess) {
ctrls_2.showPanel(FailedPanel_1.FailedPanel, data);
}
else if (
data.prize.image || data.tool.type
) {
else if (
(data.prize && data.prize.image) || (data.tool && data.tool.type)
) {
ctrls_2.showPanel(SuccessPrizePanel_1.SuccessPrizePanel, data);
}
else {
...
...
@@ -11645,6 +11645,11 @@ var Tools = (function () {
if (creditsData && !creditsData.success && !creditsData.data.isvip) {
return [2, creditsData.data.url];
}
if (!creditsData.data.credits ||
creditsData.data.credits < TaoBaoNet_1.getTbData(TaoBaoNet_1.TbNetName.getActivityBaseInfoById).data.buyCredits[type]) {
ctrls_2.showPanel(CreditsOutPanel_1.CreditsOutPanel);
return [2, false];
}
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.exchange, { type: type, credits: creditsData.data.credits }, null, true)];
case 2:
res = _a.sent();
...
...
@@ -16559,7 +16564,7 @@ var BuyPowerPanel = (function (_super) {
});
BuyPowerPanel.prototype.initUi = function () {
var _this = this;
var btnTxt = this.exchangeBtn.addChild(Tools_1.Tools.getText('1
0
店铺积分', 36, '#ffffff', TEXT_ALIGN.CENTER, this.exchangeBtn.width, 0, -6));
var btnTxt = this.exchangeBtn.addChild(Tools_1.Tools.getText('1店铺积分', 36, '#ffffff', TEXT_ALIGN.CENTER, this.exchangeBtn.width, 0, -6));
btnTxt.textHeight = this.exchangeBtn.height;
btnTxt.verticalAlign = VERTICAL_ALIGN.MIDDLE;
btnTxt.bold = true;
...
...
@@ -17919,7 +17924,7 @@ var SuccessPrizePanel = (function (_super) {
propImg.texture = RES_1.RES.getRes('boomBtn.png');
propImg.y += 5;
propImg.x += 15;
propLabel.text = '
步数
道具\tx1';
propLabel.text = '
炸弹
道具\tx1';
break;
case PropType_1.PropType.HAMMERS:
propImg.texture = RES_1.RES.getRes('hammerBtn.png');
...
...
@@ -17936,13 +17941,14 @@ var SuccessPrizePanel = (function (_super) {
if (this.data.level == 120) {
this.againBtn.visible = false;
this.goPrizeBtn.visible = false;
this.noPrizeAgainBtn.changeTexture(RES_1.RES.getRes("开奖按钮120.png"));
}
else {
this.noPrizeAgainBtn.visible = false;
}
this.prop.visible = false;
this.prizeImg.texture = Texture.fromUrl(this.data.prize.image);
this.tipsTex.text = '\t
\t闯关成功!获得抽大奖机会!
';
this.tipsTex.text = '\t
闯关成功!有机会抽取如下奖品
';
}
};
SuccessPrizePanel.prototype.lightEffect = function () {
...
...
@@ -22334,11 +22340,14 @@ var PrizeBox = (function (_super) {
var _this = this;
this.position.set(558, 269);
this.checkTip = this.addChild(Tools_1.Tools.getText('再闯XXX关', 22, '#ffffff', TEXT_ALIGN.CENTER, 158, 0, 64));
this.tip = this.addChild(Tools_1.Tools.getText('参与红包抽奖\n赢XXX优惠券', 17, '#ec5a5a', TEXT_ALIGN.CENTER, 158, 0, 11
2
));
this.tip = this.addChild(Tools_1.Tools.getText('参与红包抽奖\n赢XXX优惠券', 17, '#ec5a5a', TEXT_ALIGN.CENTER, 158, 0, 11
5
));
this.tip.lineSpacing = 0;
this.prizeImg = this.addChild(Tools_1.Tools.getSprite('map_star_enable.png', 39, 150));
this.prizeImg.width = 80;
this.prizeImg.height = 33;
this.prizeImg.width = 98;
this.prizeImg.height = 36;
this.prizeImg.x = this.width / 2;
this.prizeImg.anchorTexture.x = 0.5;
this.prizeImg.y -= 11;
var prizes = Tools_1.Tools.gameData.prizes;
if (prizes.length <= 0) {
var curLevel_1 = Tools_1.Tools.gameData.currentLevel;
...
...
@@ -22353,9 +22362,8 @@ var PrizeBox = (function (_super) {
});
console.log(upLevel_1, dLevel_1);
this.checkTip.text = "\u518D\u95EF" + dLevel_1 + "\u5173";
this.tip.text = '';
this.tip.text = '
有机会获得
';
this.prizeImg.texture = Texture.fromUrl(Tools_1.Tools.baseInfo.levelPrize["level_" + upLevel_1]);
this.prizeImg.y -= 20;
this.addEventListener(FYGE.MouseEvent.CLICK, function () {
ctrls_1.showToast(_this.checkTip.text + "才可以抽奖哦");
}, this);
...
...
@@ -22377,7 +22385,6 @@ var PrizeBox = (function (_super) {
});
this.checkTip.text = "\u70B9\u51FB\u62BD\u5956";
this.tip.text = "\u62BD\u53D6" + lowerLevel_1 + "\u5173\u5956\u52B1";
this.tip.y += 10;
this.prizeImg.texture = Texture.fromUrl(Tools_1.Tools.baseInfo.levelPrize["level_" + lowerLevel_1]);
this.addEventListener(FYGE.MouseEvent.CLICK, function () {
ctrls_1.changeScene(LotteryScene_1.LotteryScene, { level: lowerLevel_1 });
output.js.map
View file @
b73d38cd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
resource/SuccessPanel/开奖按钮120.png
0 → 100644
View file @
b73d38cd
18.1 KB
resource/common/star.png
deleted
100644 → 0
View file @
606d8e98
51.6 KB
src/Tools.ts
View file @
b73d38cd
...
...
@@ -2,7 +2,7 @@ import { RES } from "../module/RES";
import
{
layers
}
from
"../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
import
{
sendTbNet
,
TbNetName
}
from
"./TaoBaoNet"
;
import
{
sendTbNet
,
TbNetName
,
getTbData
}
from
"./TaoBaoNet"
;
import
{
PropType
}
from
"./something/enum/PropType"
;
import
{
showToast
}
from
"../module/ctrls"
;
import
{
showPanel
}
from
"../module/ctrls"
;
...
...
@@ -111,7 +111,7 @@ export class Tools {
*/
public
static
consumerTools
(
type
:
PropType
):
Promise
<
boolean
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
sendTbNet
(
TbNetName
.
consumerTools
,
{
type
},
(
s
,
res
)
=>
{
if
(
s
)
{
//修改道具数量
this
.
gameData
.
tools
=
res
.
data
.
tools
;
...
...
@@ -128,7 +128,12 @@ export class Tools {
public
static
gameOver
(
data
)
{
if
(
!
data
.
isVisitSuccess
)
{
// 闯关失败
showPanel
(
FailedPanel
,
data
);
}
else
if
(
data
.
prize
.
image
||
data
.
tool
.
type
)
{
// 闯关成功,奖励关卡
}
else
if
((
data
.
prize
&&
data
.
prize
.
image
)
||
(
data
.
tool
&&
data
.
tool
.
type
)
||
data
.
level
==
120
)
{
// 闯关成功,奖励关卡
//120关,如果没有奖品图片,伪造一个
if
(
data
.
level
==
120
&&
(
!
data
.
prize
||
!
data
.
prize
.
image
))
{
data
.
prize
=
data
.
prize
||
{};
data
.
prize
.
image
=
Tools
.
baseInfo
.
levelPrize
[
'level_120'
];
}
showPanel
(
SuccessPrizePanel
,
data
);
}
else
{
// 闯关成功,不是奖励关卡
showPanel
(
SuccessNoPrizePanel
,
data
);
...
...
@@ -150,7 +155,14 @@ export class Tools {
if
(
creditsData
&&
!
creditsData
.
success
&&
!
creditsData
.
data
.
isvip
)
{
return
creditsData
.
data
.
url
}
const
res
=
await
sendTbNet
(
TbNetName
.
exchange
,
{
type
,
credits
:
creditsData
.
data
.
credits
},
null
,
true
)
//判断积分,不足兑换
if
(
!
creditsData
.
data
.
credits
||
creditsData
.
data
.
credits
<
getTbData
(
TbNetName
.
getActivityBaseInfoById
).
data
.
buyCredits
[
type
]
)
{
showPanel
(
CreditsOutPanel
)
return
false
}
const
res
=
await
sendTbNet
(
TbNetName
.
exchange
,
{
type
,
credits
:
creditsData
.
data
.
credits
},
null
,
true
)
if
(
res
.
success
)
{
//修改道具数量和体力
this
.
gameData
.
power
=
res
.
data
.
power
;
...
...
@@ -175,11 +187,11 @@ export class Tools {
var
tbMy
=
my
if
(
!
tbMy
)
return
;
//@ts-ignore
const
{
cloud
}
=
getApp
();
const
{
cloud
}
=
getApp
();
//测试地址//到时云存储传一个小json,,改路径
var
url
=
"cloud://B4F0300E5148F478B506DEDC26EA4C6C//butterfly0.svga"
;
//获取临时地址
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
var
urls
=
await
cloud
.
file
.
getTempFileURL
({
fileId
:
[
url
]
})
url
=
urls
[
0
].
url
.
replace
(
'-internal'
,
''
);
tbMy
.
downloadFile
({
url
:
url
,
...
...
@@ -188,10 +200,10 @@ export class Tools {
tbMy
.
getFileSystemManager
().
readFile
({
filePath
:
i
,
// encoding: "utf8",
success
:
function
(
r
)
{
success
:
function
(
r
)
{
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
}
})
...
...
@@ -335,11 +347,11 @@ export class Tools {
showTime
:
number
=
300
)
{
Tween
.
get
(
target
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
set
({
alpha
:
0
,
visible
:
true
})
.
to
({
alpha
:
1
},
showTime
,
Ease
.
quadIn
)
.
wait
(
time
)
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
to
({
alpha
:
0
},
showTime
,
Ease
.
quadOut
)
.
set
({
alpha
:
0
,
visible
:
false
})
.
call
(()
=>
{
call
();
});
...
...
src/panels/SuccessPrizePanel.ts
View file @
b73d38cd
...
...
@@ -99,6 +99,7 @@ export class SuccessPrizePanel extends Panel {
if
(
this
.
data
.
level
==
120
)
{
//120关不显示闯关按钮,换图
this
.
againBtn
.
visible
=
false
;
this
.
goPrizeBtn
.
visible
=
false
;
this
.
noPrizeAgainBtn
.
changeTexture
(
RES
.
getRes
(
"开奖按钮120.png"
))
}
else
{
this
.
noPrizeAgainBtn
.
visible
=
false
;
}
...
...
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