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
7c2f2c3b
Commit
7c2f2c3b
authored
Oct 30, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c63f272d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
53 deletions
+66
-53
turntable.svga
egret/resource/assets/svgas/turntable.svga
+0
-0
TurntablePrize2Skin.exml
egret/resource/skins/TurntablePrize2Skin.exml
+2
-4
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+10
-9
ScratchRulePanel.ts
egret/src/panels/ScratchRulePanel.ts
+5
-5
TurntablePrize2Panel.ts
egret/src/panels/TurntablePanel/TurntablePrize2Panel.ts
+44
-20
turnabledojoin.json
mock/happyclear/turnabledojoin.json
+5
-15
No files found.
egret/resource/assets/svgas/turntable.svga
View file @
7c2f2c3b
No preview for this file type
egret/resource/skins/TurntablePrize2Skin.exml
View file @
7c2f2c3b
...
@@ -5,10 +5,8 @@
...
@@ -5,10 +5,8 @@
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"386"
y=
"307"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Image
id=
"light1"
source=
"invitebg2_png"
x=
"386"
y=
"307"
anchorOffsetX=
"356"
anchorOffsetY=
"296"
/>
<e:Group
id=
"container"
y=
"-98.45"
x=
"-3"
/>
<e:Group
id=
"container"
y=
"-98.45"
x=
"-3"
/>
<e:Image
source=
"turnprize2bg_png"
y=
"159"
horizontalCenter=
"0"
/>
<e:Image
source=
"turnprize2bg_png"
y=
"159"
horizontalCenter=
"0"
/>
<e:Group
y=
"326"
horizontalCenter=
"0"
>
<e:Image
y=
"323"
source=
"scratch_card_bg_png"
horizontalCenter=
"0"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
<e:Image
id=
"prizeImg"
width=
"508"
height=
"225"
source=
""
x=
"121"
y=
"345"
/>
<e:Image
id=
"scratch_progress"
y=
"0"
x=
"0"
source=
"scratch_card_98_png"
/>
</e:Group>
<e:Button
id=
"closeBtn"
label=
""
y=
"242.88"
x=
"615"
>
<e:Button
id=
"closeBtn"
label=
""
y=
"242.88"
x=
"615"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
...
...
egret/src/panels/ScratchPanel.ts
View file @
7c2f2c3b
...
@@ -13,30 +13,31 @@ import { getlogItem } from "../Main";
...
@@ -13,30 +13,31 @@ import { getlogItem } from "../Main";
export
default
class
ScratchPanel
extends
Panel
{
export
default
class
ScratchPanel
extends
Panel
{
private
cutTimer
:
CutTimer
;
private
cutTimer
:
CutTimer
;
private
myShape
:
egret
.
Shape
=
new
egret
.
Shape
();
constructor
(
data
)
{
constructor
(
data
)
{
super
();
super
();
this
.
data
=
data
;
this
.
data
=
data
;
}
}
private
myShape
:
egret
.
Shape
=
new
egret
.
Shape
();
private
pIndex
=
0
;
private
pIndex
=
0
;
setGtaphics
(
x
,
y
)
{
setGtaphics
(
x
,
y
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
this
.
pIndex
%
2
==
0
){
// 双数
if
(
this
.
pIndex
%
2
==
0
)
{
// 双数
y
-=
25
;
y
-=
25
;
if
(
y
<=
this
[
"prizeImg"
].
y
){
if
(
y
<=
this
[
"prizeImg"
].
y
)
{
this
.
pIndex
++
;
this
.
pIndex
++
;
}
}
}
else
{
// 单数
}
else
{
// 单数
y
+=
25
;
y
+=
25
;
if
(
y
>=
(
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
)){
if
(
y
>=
(
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
))
{
this
.
pIndex
++
;
this
.
pIndex
++
;
}
}
}
}
x
+=
5
;
x
+=
5
;
this
.
myShape
.
graphics
.
lineTo
(
x
,
y
);
this
.
myShape
.
graphics
.
lineTo
(
x
,
y
);
if
(
x
>
(
+
this
.
data
.
completePercent
)
/
100
*
this
[
"prizeImg"
].
width
+
10
)
{
if
(
x
>
this
[
"prizeImg"
].
x
+
(
+
this
.
data
.
completePercent
)
/
100
*
this
[
"prizeImg"
].
width
-
60
)
{
return
;
return
;
}
}
this
.
setGtaphics
(
x
,
y
);
this
.
setGtaphics
(
x
,
y
);
...
@@ -55,10 +56,10 @@ export default class ScratchPanel extends Panel {
...
@@ -55,10 +56,10 @@ export default class ScratchPanel extends Panel {
this
[
"prizeImg"
].
mask
=
this
.
myShape
;
this
[
"prizeImg"
].
mask
=
this
.
myShape
;
this
.
myShape
.
graphics
.
lineStyle
(
130
,
0xff0000
,
1
);
this
.
myShape
.
graphics
.
lineStyle
(
130
,
0xff0000
,
1
);
this
.
myShape
.
graphics
.
moveTo
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
width
);
this
.
myShape
.
graphics
.
moveTo
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setGtaphics
(
this
[
"prizeImg"
].
x
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
this
.
setGtaphics
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
},
500
);
},
500
);
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
const
scratchData
=
DataManager
.
ins
.
getData
(
'hc_turnableDojoin'
);
...
...
egret/src/panels/ScratchRulePanel.ts
View file @
7c2f2c3b
...
@@ -31,11 +31,11 @@ export default class ScratchRulePanel extends Panel {
...
@@ -31,11 +31,11 @@ export default class ScratchRulePanel extends Panel {
private
addRule
()
{
private
addRule
()
{
const
text
=
const
text
=
`<br>1、用户每天邀请指定数量的
新玩家参与闯关
,可获得指定的现金券奖励。
`<br>1、用户每天邀请指定数量的
玩家助力刮卡
,可获得指定的现金券奖励。
2、用户
发起邀请后,需在24小时内完成邀请任务;超过24小时,邀请任务失败,无法获得奖励,需重新发起邀请
。
2、用户
抽中刮刮卡后,需在24小时内完成刮卡任务;超过24小时,刮卡任务失败,则无法获得奖励,且此张刮卡失效
。
3、
新用户仅包含未参与过狮狮连萌活动的用户
。
3、
用户每天只能助力2位好友,但不可为自己刮卡或重复为同一个好友助力刮卡
。
4、
用户不可为自己助力,或重复为好友
助力。
4、
好友点击邀请页面中的“去看看”按钮进入游戏即可完成
助力。
5、完成
邀请任务后,玩家可点击首页“邀请得现金券
”图标领取现金券。
5、完成
刮卡任务后,玩家可点击首页“刮现金红包
”图标领取现金券。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。
7、活动过程中,凡以不正当手段(包括但不限于作弊、恶意套现、扰乱系统、网络攻击等违规行为)参与本次活动的用户,苏宁易购有权终止其参加活动,并取消其获得奖励的资格。
7、活动过程中,凡以不正当手段(包括但不限于作弊、恶意套现、扰乱系统、网络攻击等违规行为)参与本次活动的用户,苏宁易购有权终止其参加活动,并取消其获得奖励的资格。
8、极少数特殊情况下,若用户在完成活动的任务中被系统判定异常账户或风控账户,则可能导致奖励发放异常。
8、极少数特殊情况下,若用户在完成活动的任务中被系统判定异常账户或风控账户,则可能导致奖励发放异常。
...
...
egret/src/panels/TurntablePanel/TurntablePrize2Panel.ts
View file @
7c2f2c3b
...
@@ -10,12 +10,55 @@ import { getlogItem } from "../../Main";
...
@@ -10,12 +10,55 @@ import { getlogItem } from "../../Main";
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
export
default
class
TurnPrize2Panel
extends
Panel
{
export
default
class
TurnPrize2Panel
extends
Panel
{
private
myShape
:
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
.
option
.
completePercent
)
/
100
*
this
[
"prizeImg"
].
width
-
60
){
return
;
}
this
.
setGtaphics
(
x
,
y
);
},
20
);
}
start
(
data
)
{
start
(
data
)
{
this
.
data
=
data
;
super
.
start
();
super
.
start
();
this
.
showlog
();
this
.
showlog
();
this
[
"progressGroup"
].
mask
=
this
[
"progressMask"
];
this
[
"progressGroup"
].
mask
=
this
[
"progressMask"
];
this
.
setProgress
(
+
data
.
option
.
completePercent
);
this
.
setProgress
(
+
data
.
option
.
completePercent
);
this
.
data
.
url
=
data
.
option
.
prizeImage
;
// this.data.url = data.option.prizeImage;
this
[
"prizeImg"
].
source
=
this
.
data
.
option
.
prizeImage
;
this
.
myShape
=
new
egret
.
Shape
();
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
(()
=>
{
this
.
setGtaphics
(
this
[
"prizeImg"
].
x
-
30
,
this
[
"prizeImg"
].
y
+
this
[
"prizeImg"
].
height
);
},
500
);
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
this
[
'light1'
].
visible
=
this
[
'light2'
].
visible
=
false
;
addAdComp
(
84
,
816
,
this
,
48
);
addAdComp
(
84
,
816
,
this
,
48
);
data
.
mv
.
gotoAndPlay
(
10
,
true
)
data
.
mv
.
gotoAndPlay
(
10
,
true
)
...
@@ -38,25 +81,6 @@ export default class TurnPrize2Panel extends Panel {
...
@@ -38,25 +81,6 @@ export default class TurnPrize2Panel extends Panel {
const
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
const
dProgress
=
Math
.
abs
(
progress
-
this
[
"progress"
].
width
/
this
[
"progressBg"
].
width
);
// 比当前进度的差值的绝对值
const
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
const
_duration
=
1000
*
dProgress
/
100
;
// 算出变化的时间
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
egret
.
Tween
.
get
(
this
[
"progress"
]).
to
({
width
:
_width
},
_duration
);
const
i
=
new
eui
.
Image
();
if
(
progress
>=
100
)
{
this
[
"scratch_progress"
].
visible
=
false
;
}
else
if
(
progress
>=
98
&&
progress
<
100
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_98_png"
;
}
else
if
(
progress
>=
96
&&
progress
<
98
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_96_png"
;
}
else
if
(
progress
>=
94
&&
progress
<
96
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_94_png"
;
}
else
if
(
progress
>=
92
&&
progress
<
96
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_92_png"
;
}
else
if
(
progress
<
92
)
{
this
[
"scratch_progress"
].
visible
=
true
;
this
[
"scratch_progress"
].
source
=
"scratch_card_90_png"
;
}
}
}
...
...
mock/happyclear/turnabledojoin.json
View file @
7c2f2c3b
...
@@ -4,22 +4,12 @@
...
@@ -4,22 +4,12 @@
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"timestamp"
:
1572327888728
,
"timestamp"
:
1572327888728
,
"data"
:
{
"data"
:
{
"isScratchCard"
:
fals
e
,
"isScratchCard"
:
tru
e
,
"option"
:
{
"option"
:
{
"id"
:
""
,
"scratchCardTaskId"
:
7
,
"day"
:
null
,
"prizeImage"
:
"//yun.dui88.com/images/201910/e6pmpk2pne.png"
,
"categoryType"
:
2
,
"completePercent"
:
"98"
,
"title"
:
"11"
,
"remainPercent"
:
null
"rate"
:
"11"
,
"minValue"
:
null
,
"maxValue"
:
null
,
"coinType"
:
null
,
"propType"
:
null
,
"num"
:
3
,
"img"
:
""
,
"appItemId"
:
null
,
"name"
:
""
,
"value"
:
""
},
},
"orderNum"
:
null
"orderNum"
:
null
}
}
...
...
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