Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
da2a36e3
Commit
da2a36e3
authored
Mar 24, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f0ccd722
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
69 additions
and
35 deletions
+69
-35
preload.tmproject
egret/resource/TextureMerger/preload.tmproject
+1
-0
help_card_bg.png
egret/resource/assets/help/help_card_bg.png
+0
-0
help_card_prize.png
egret/resource/assets/help/help_card_prize.png
+0
-0
default.res.json
egret/resource/default.res.json
+13
-7
HelpScratchSkin.exml
egret/resource/skins/HelpScratchSkin.exml
+3
-1
HelpBloodPanel.ts
egret/src/panels/help/HelpBloodPanel.ts
+1
-0
HelpInvitePanel.ts
egret/src/panels/help/HelpInvitePanel.ts
+4
-2
HelpScratchPanel.ts
egret/src/panels/help/HelpScratchPanel.ts
+46
-24
scratchDoHelp.json
mock/happyclear/scratchDoHelp.json
+1
-1
No files found.
egret/resource/TextureMerger/preload.tmproject
0 → 100644
View file @
da2a36e3
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/help/help_light.png"]}
\ No newline at end of file
egret/resource/assets/help/help_card_bg.png
0 → 100644
View file @
da2a36e3
18.4 KB
egret/resource/assets/help/help_card_prize.png
0 → 100644
View file @
da2a36e3
100 KB
egret/resource/default.res.json
View file @
da2a36e3
...
...
@@ -241,12 +241,8 @@
"name"
:
"eleDisNew"
},
{
"keys"
:
"help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png"
,
"keys"
:
"help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png
,help_card_prize_png,help_light_png,help_card_bg_png
"
,
"name"
:
"helpGroup"
},
{
"name"
:
"preload"
,
"keys"
:
"help_light_png"
}
],
"resources"
:
[
...
...
@@ -5087,9 +5083,19 @@
"name"
:
"help_invite_btn1_png"
},
{
"name"
:
"help_light_png"
,
"url"
:
"assets/help/help_light.png"
,
"type"
:
"image"
,
"name"
:
"help_light_png"
},
{
"url"
:
"assets/help/help_card_prize.png"
,
"type"
:
"image"
,
"name"
:
"help_card_prize_png"
},
{
"url"
:
"assets/help/help_card_bg.png"
,
"type"
:
"image"
,
"
url"
:
"assets/help/help_light.
png"
"
name"
:
"help_card_bg_
png"
}
]
}
\ No newline at end of file
egret/resource/skins/HelpScratchSkin.exml
View file @
da2a36e3
...
...
@@ -8,7 +8,7 @@
<e:Image
id=
"go1btn"
source=
"help_invite_success_btn_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
<e:Group
y=
"406.12"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite_text_png"
visible=
"false"
/>
<e:Image
id=
"txt_standby"
y=
"0"
horizontalCenter=
"0"
source=
"help_invite_text_png"
/>
<e:Image
id=
"txt_success"
horizontalCenter=
"0"
source=
"help_invite_success_txt_png"
visible=
"false"
/>
<e:Image
id=
"txt_error0000024"
source=
"help_invite_fail_text1_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error0000022"
source=
"help_invite_fail_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
...
...
@@ -16,4 +16,6 @@
<e:Image
id=
"txt_errorxxxx"
horizontalCenter=
"0"
source=
"help_invite_fail_text4_png"
visible=
"false"
/>
</e:Group>
<e:Image
id=
"closeBtn"
source=
"help_closebtn1_png"
x=
"613"
y=
"350.12"
/>
<e:Image
source=
"help_card_bg_png"
y=
"497.48"
x=
"94"
/>
<e:Image
id=
"prizeImg"
source=
"help_card_prize_png"
x=
"121.5"
y=
"517.96"
width=
"508"
height=
"227"
/>
</e:Skin>
\ No newline at end of file
egret/src/panels/help/HelpBloodPanel.ts
View file @
da2a36e3
...
...
@@ -20,6 +20,7 @@ export default class HelpBloodPanel extends Panel {
NetManager
.
ins
.
showLog
(
getlogItem
(
87
));
const
s
=
new
egret
.
Sprite
();
this
.
addChildAt
(
s
,
0
);
s
.
y
=-
250
;
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
...
...
egret/src/panels/help/HelpInvitePanel.ts
View file @
da2a36e3
...
...
@@ -14,12 +14,14 @@ export default class HelpInvitePanel extends Panel {
this
.
code
=
data
.
code
;
// NetManager.ins.showLog(getlogItem(87));
const
s
=
new
egret
.
Sprite
();
this
.
addChildAt
(
s
,
0
);
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
loadSvga
(
getResPath
()
+
'resource/assets/svgas/invitebg.svga'
,
this
).
then
((
mv
:
egret
.
DisplayObject
)
=>
{
this
[
'g1'
]
.
addChild
(
mv
);
s
.
addChild
(
mv
);
mv
.
y
=
-
180
;
});
...
...
egret/src/panels/help/HelpScratchPanel.ts
View file @
da2a36e3
...
...
@@ -11,6 +11,29 @@ export default class HelpScratchPanel extends Panel {
netCallback
;
code
;
list
:
any
[];
private
myShape
:
egret
.
Shape
=
new
egret
.
Shape
();
private
pIndex
=
0
;
setGtaphics
(
x
,
y
)
{
setTimeout
(()
=>
{
if
(
this
.
pIndex
%
2
==
0
)
{
// 双数
y
-=
25
;
if
(
y
<=
this
[
"prizeImg"
].
y
)
{
this
.
pIndex
++
;
}
}
else
{
// 单数
y
+=
25
;
if
(
y
>=
(
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
))
{
this
.
pIndex
++
;
}
}
x
+=
5
;
this
.
myShape
.
graphics
.
lineTo
(
x
,
y
);
if
(
x
>
this
[
"prizeImg"
].
x
+
(
+
this
.
data
.
completePercent
)
/
100
*
this
[
"prizeImg"
].
width
-
60
)
{
return
;
}
this
.
setGtaphics
(
x
,
y
);
},
20
);
}
async
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
...
...
@@ -50,6 +73,23 @@ export default class HelpScratchPanel extends Panel {
await
play2
(
this
.
list
[
0
]);
this
[
'light'
].
visible
=
true
;
});
this
.
myShape
.
graphics
.
beginFill
(
0xff0000
,
0
);
this
.
myShape
.
graphics
.
drawRect
(
this
[
"prizeImg"
].
x
,
this
[
"prizeImg"
].
y
,
this
[
"prizeImg"
].
width
,
this
[
"prizeImg"
].
height
);
this
.
myShape
.
graphics
.
endFill
();
this
.
addChild
(
this
.
myShape
);
this
[
"prizeImg"
].
mask
=
this
.
myShape
;
this
.
myShape
.
graphics
.
lineStyle
(
130
,
0xff0000
,
1
);
this
.
myShape
.
graphics
.
moveTo
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
// setTimeout(() => {
// }, 2000);
}
startAni
()
{
this
.
setGtaphics
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
}
onclick_closeBtn
()
{
...
...
@@ -62,25 +102,24 @@ export default class HelpScratchPanel extends Panel {
}
onClick
()
{
this
[
'light'
].
visible
=
false
;
this
[
'helpbtn'
].
visible
=
false
;
this
.
list
[
0
].
visible
=
false
;
const
_code
=
this
.
code
.
slice
(
8
);
NetManager
.
ins
.
scratchDoHelp
(
async
(
success
,
res
)
=>
{
this
.
netCallback
();
this
.
startAni
();
await
wait
(
2000
);
this
[
'txt_standby'
].
visible
=
false
;
this
.
list
[
0
].
visible
=
false
;
this
[
'light'
].
visible
=
false
;
this
[
'helpbtn'
].
visible
=
false
;
if
(
success
)
{
this
[
'go1btn'
].
visible
=
true
;
this
[
'txt_success'
].
visible
=
true
;
this
.
list
[
1
].
visible
=
true
;
await
play2
(
this
.
list
[
1
]);
this
[
'light'
].
visible
=
true
;
}
else
{
this
[
'go2btn'
].
visible
=
true
;
this
.
list
[
2
].
visible
=
true
;
await
play2
(
this
.
list
[
2
]);
var
codeMsgs
=
{
"0000024"
:
"今日刮卡次数已达到上线限哦~"
,
"0000022"
:
"不可以给自己刮哦~"
,
...
...
@@ -91,26 +130,9 @@ export default class HelpScratchPanel extends Panel {
}
else
{
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
play2
(
this
.
list
[
2
]);
}
// switch (true) {
// case (res.code == "0000024"):
// showToast("今日刮卡次数已达到上线限哦~");
// break;
// case (res.code == "0000022"):
// showToast("不可以给自己刮哦~");
// break;
// case (res.code == "0000023"):
// showToast("已经给好友刮过了哦~");
// break;
// default:
// break;
// }
// if (!success) {
// return;
// }
// showToast("助力成功,参与闯关赢现金"/*"帮刮成功!"*/);
},
_code
);
}
...
...
mock/happyclear/scratchDoHelp.json
View file @
da2a36e3
{
"success"
:
0
,
"success"
:
1
,
"code"
:
"0000023"
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
...
...
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