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
1d86372f
Commit
1d86372f
authored
Oct 26, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b89cd1a2
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
83 additions
and
31 deletions
+83
-31
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+2
-2
startpanel_ele10.png
egret/resource/assets/startpanel2/startpanel_ele10.png
+0
-0
turnprize_icon1.png
egret/resource/assets/turntableprize/turnprize_icon1.png
+0
-0
turnprize_icon2.png
egret/resource/assets/turntableprize/turnprize_icon2.png
+0
-0
turnprize_icon3.png
egret/resource/assets/turntableprize/turnprize_icon3.png
+0
-0
default.res.json
egret/resource/default.res.json
+22
-2
TargetItemSkin.exml
egret/resource/skins/TargetItemSkin.exml
+1
-0
TurntableNoPrizeSkin.exml
egret/resource/skins/TurntableNoPrizeSkin.exml
+2
-2
TurntablePrizeSkin.exml
egret/resource/skins/TurntablePrizeSkin.exml
+13
-6
MapScene.ts
egret/src/mapScene/MapScene.ts
+15
-6
TurntableNoPrizePanel.ts
egret/src/panels/TurntablePanel/TurntableNoPrizePanel.ts
+8
-9
TurntablePrizePanel.ts
egret/src/panels/TurntablePanel/TurntablePrizePanel.ts
+17
-1
turnablebaseInfo.json
mock/happyclear/turnablebaseInfo.json
+2
-2
turnabledojoin.json
mock/happyclear/turnabledojoin.json
+1
-1
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
1d86372f
...
...
@@ -928,7 +928,7 @@ export class NetManager extends ABNetManager {
this
.
send
(
net
);
})
}
public
hc_turnableBaseInfo
(
callback
:
Function
,
propType
?:
number
):
void
{
public
hc_turnableBaseInfo
(
callback
:
Function
):
void
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
};
...
...
@@ -943,7 +943,7 @@ export class NetManager extends ABNetManager {
};
this
.
send
(
net
);
}
public
hc_turnableDojoin
(
callback
:
Function
,
propType
?:
number
):
void
{
public
hc_turnableDojoin
(
callback
:
Function
):
void
{
const
d
:
any
=
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
detect
:
window
[
'detect'
],
...
...
egret/resource/assets/startpanel2/startpanel_ele10.png
0 → 100644
View file @
1d86372f
7.43 KB
egret/resource/assets/turntableprize/turnprize_icon1.png
0 → 100644
View file @
1d86372f
61.7 KB
egret/resource/assets/turntableprize/turnprize_icon2.png
0 → 100644
View file @
1d86372f
54.6 KB
egret/resource/assets/turntableprize/turnprize_icon3.png
0 → 100644
View file @
1d86372f
71.6 KB
egret/resource/default.res.json
View file @
1d86372f
...
...
@@ -61,7 +61,7 @@
"name"
:
"prize2"
},
{
"keys"
:
"startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png"
,
"keys"
:
"startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png
,startpanel_ele10_png
"
,
"name"
:
"startpanel"
},
{
...
...
@@ -157,7 +157,7 @@
"name"
:
"back"
},
{
"keys"
:
"turprize继续闯关按钮_png,turprizebg_png"
,
"keys"
:
"turprize继续闯关按钮_png,turprizebg_png
,turnprize_icon1_png,turnprize_icon2_png,turnprize_icon3_png
"
,
"name"
:
"turntableprize"
},
{
...
...
@@ -2747,6 +2747,26 @@
"url"
:
"assets/turntable/turnable_icon3.png"
,
"type"
:
"image"
,
"name"
:
"turnable_icon3_png"
},
{
"url"
:
"assets/turntableprize/turnprize_icon1.png"
,
"type"
:
"image"
,
"name"
:
"turnprize_icon1_png"
},
{
"url"
:
"assets/turntableprize/turnprize_icon2.png"
,
"type"
:
"image"
,
"name"
:
"turnprize_icon2_png"
},
{
"url"
:
"assets/turntableprize/turnprize_icon3.png"
,
"type"
:
"image"
,
"name"
:
"turnprize_icon3_png"
},
{
"url"
:
"assets/startpanel2/startpanel_ele10.png"
,
"type"
:
"image"
,
"name"
:
"startpanel_ele10_png"
}
]
}
\ No newline at end of file
egret/resource/skins/TargetItemSkin.exml
View file @
1d86372f
...
...
@@ -12,5 +12,6 @@
<e:Image
id=
"icon7"
width=
"60"
height=
"60"
source=
"startpanel_ele7_png"
/>
<e:Image
id=
"icon8"
width=
"60"
height=
"60"
source=
"startpanel_ele8_png"
/>
<e:Image
id=
"icon9"
width=
"60"
height=
"60"
source=
"startpanel_ele9_png"
/>
<e:Image
id=
"icon10"
width=
"60"
height=
"60"
source=
"startpanel_ele10_png"
/>
<e:BitmapLabel
id=
"txt"
text=
"X0"
font=
"nums2_fnt"
scaleX=
"0.4"
scaleY=
"0.4"
y=
"46"
horizontalCenter=
"0"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TurntableNoPrizeSkin.exml
View file @
1d86372f
...
...
@@ -28,10 +28,10 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
id=
"status2"
text=
"(免费次数:1)"
x=
"69.3"
y=
"62.66"
size=
"22"
touchEnabled=
"false"
/>
<e:Label
id=
"status2"
text=
"(免费次数:1)"
x=
"69.3"
y=
"62.66"
size=
"22"
touchEnabled=
"false"
visible=
"false"
/>
<e:Group
id=
"status1"
x=
"52"
y=
"60"
touchChildren=
"false"
touchEnabled=
"false"
>
<e:Label
text=
")"
x=
"132"
y=
"2"
size=
"22"
touchEnabled=
"false"
/>
<e:Label
id=
"nums"
text=
"(-50"
x=
"0"
y=
"
0
"
size=
"22"
textAlign=
"right"
width=
"82"
touchEnabled=
"false"
/>
<e:Label
id=
"nums"
text=
"(-50"
x=
"0"
y=
"
3
"
size=
"22"
textAlign=
"right"
width=
"82"
touchEnabled=
"false"
/>
<e:Image
source=
"common_yuanbao_png"
x=
"91.99"
y=
"1.67"
/>
</e:Group>
</e:Group>
...
...
egret/resource/skins/TurntablePrizeSkin.exml
View file @
1d86372f
...
...
@@ -5,8 +5,15 @@
<e:Image
id=
"light2"
source=
"invitebg2_png"
x=
"376"
y=
"297"
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:Image
source=
"turprizebg_png"
y=
"161"
horizontalCenter=
"0.5"
/>
<e:Image
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
y=
"355.76"
/>
<e:Image
id=
"bg"
source=
"turprizebg_png"
y=
"161"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"img"
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
y=
"355.76"
/>
<e:Image
id=
"prop"
horizontalCenter=
"0"
y=
"333.03"
source=
"turnprize_icon1_png"
scaleY=
"0.8"
scaleX=
"0.8"
visible=
"false"
/>
<e:Image
id=
"money"
source=
"signprize元宝_png"
y=
"336.2"
horizontalCenter=
"0"
scaleX=
"0.8"
scaleY=
"0.8"
visible=
"false"
/>
<e:Image
id=
"blood"
source=
"singprize体力_png"
y=
"298.8"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Group
id=
"numsgroup"
x=
"396.38"
y=
"344.4"
visible=
"false"
>
<e:Image
id=
"numsbg0"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"nums0"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
/>
</e:Group>
<e:Button
id=
"closeBtn"
label=
""
y=
"242.88"
x=
"615"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
@@ -32,11 +39,11 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group
id=
"status1"
x=
"52"
y=
"60"
visible=
"false"
>
<e:Label
text=
")"
x=
"1
32
"
y=
"2"
size=
"22"
touchEnabled=
"false"
/>
<e:Label
id=
"nums"
text=
"(-50"
x=
"
0"
y=
"0
"
size=
"22"
textAlign=
"right"
width=
"82"
touchEnabled=
"false"
/>
<e:Group
id=
"status1"
x=
"52"
y=
"60"
>
<e:Label
text=
")"
x=
"1
28.96
"
y=
"2"
size=
"22"
touchEnabled=
"false"
/>
<e:Label
id=
"nums"
text=
"(-50"
x=
"
3.04"
y=
"1.52
"
size=
"22"
textAlign=
"right"
width=
"82"
touchEnabled=
"false"
/>
<e:Image
source=
"common_yuanbao_png"
x=
"91.99"
y=
"1.67"
/>
</e:Group>
</e:Group>
<e:Label
id=
"satus2"
text=
"(免费次数:1)"
x=
"169.3"
y=
"693.66"
size=
"22"
touchEnabled=
"false"
visible=
"false"
/>
<e:Label
id=
"s
t
atus2"
text=
"(免费次数:1)"
x=
"169.3"
y=
"693.66"
size=
"22"
touchEnabled=
"false"
visible=
"false"
/>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
1d86372f
...
...
@@ -75,6 +75,15 @@ export default class MapScene extends Scene {
async
start
(
data
?)
{
super
.
start
();
NetManager
.
ins
.
hc_turnableDojoin
((
s
,
res
)
=>
{
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
const
data
=
res
.
data
;
const
_data
=
Utils
.
deepClone
(
data
);
_data
.
mv
=
mv
;
PanelCtrl
.
instance
.
show
(
'TurnPrizePanel'
,
_data
);
});
});
this
.
addIcon
();
// 添加Icon
this
.
sendInvite
();
...
...
@@ -484,7 +493,7 @@ export default class MapScene extends Scene {
if
(
!
success
||
!
res
.
data
)
{
return
;
}
le
t
flag
=
res
.
data
.
completeFlag
;
cons
t
flag
=
res
.
data
.
completeFlag
;
switch
(
true
)
{
case
(
flag
==
0
):
// 未完成
this
.
loadsvga
(
res
);
...
...
@@ -561,7 +570,7 @@ export default class MapScene extends Scene {
if
(
!
success
||
!
res
.
data
)
{
return
;
}
le
t
flag
=
res
.
data
.
completeFlag
;
cons
t
flag
=
res
.
data
.
completeFlag
;
if
(
this
.
inviteTimer
)
{
this
.
inviteTimer
.
stop
();
}
...
...
@@ -611,7 +620,7 @@ export default class MapScene extends Scene {
// 倒计时
private
inviteCutTimer
()
{
le
t
timer
=
this
.
convertTime
(
this
.
cutTime
-=
1000
);
cons
t
timer
=
this
.
convertTime
(
this
.
cutTime
-=
1000
);
if
(
timer
.
hour
===
"00"
&&
timer
.
min
===
"00"
&&
timer
.
sec
===
"00"
)
{
...
...
@@ -623,9 +632,9 @@ export default class MapScene extends Scene {
// 通过时间戳获取时间计数(时,分,秒)
private
convertTime
(
time
:
number
)
{
le
t
hour
=
~~
(
time
/
3600000
);
// 小时
le
t
min
=
~~
((
time
-
hour
*
3600000
)
/
60000
);
// 分
le
t
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
cons
t
hour
=
~~
(
time
/
3600000
);
// 小时
cons
t
min
=
~~
((
time
-
hour
*
3600000
)
/
60000
);
// 分
cons
t
sec
=
~~
((
time
-
hour
*
3600000
-
min
*
60000
)
/
1000
);
// 秒
return
{
hour
:
Utils
.
prefixInteger
(
hour
,
2
),
...
...
egret/src/panels/TurntablePanel/TurntableNoPrizePanel.ts
View file @
1d86372f
...
...
@@ -17,13 +17,12 @@ export default class TurntableNoPrizePanel extends Panel {
this
[
'tips'
+
data
.
type
].
visible
=
true
;
NetManager
.
ins
.
hc_turnableBaseInfo
((
success
,
res
)
=>
{
const
data
=
res
.
data
;
this
[
'status1'
].
visible
=
data
.
remainTimes
<=
0
;
this
[
'status2'
].
visible
=
!
this
[
'status1'
].
visible
;
this
[
'nums'
].
text
=
`(-
${
data
.
remainTimes
}
`
;
this
[
'status2'
].
text
=
`免费次数:\n
${
data
.
remainTimes
}
次`
;
this
[
'status1'
].
visible
=
data
.
remainTimes
<=
0
;
this
[
'status2'
].
visible
=
!
this
[
'status1'
].
visible
;
this
[
'nums'
].
text
=
`(-
${
data
.
nextTimeNeedCoin
}
`
;
this
[
'status2'
].
text
=
`免费次数:
${
data
.
remainTimes
}
次`
;
});
}
showlog
()
{
...
...
egret/src/panels/TurntablePanel/TurntablePrizePanel.ts
View file @
1d86372f
...
...
@@ -4,6 +4,7 @@ import { gotoNextLevel } from "../gotoNextLevel";
import
PanelCtrl
from
"../../../libs/new_wx/ctrls/panelCtrl"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
export
default
class
TurnPrizePanel
extends
Panel
{
start
(
data
)
{
...
...
@@ -19,6 +20,21 @@ export default class TurnPrizePanel extends Panel {
this
.
playBgAni
();
},
this
);
this
[
'container'
].
addChild
(
data
.
mv
);
NetManager
.
ins
.
hc_turnableBaseInfo
((
success
,
res
)
=>
{
const
data
=
res
.
data
;
this
[
'status1'
].
visible
=
data
.
remainTimes
<=
0
;
this
[
'status2'
].
visible
=
!
this
[
'status1'
].
visible
;
this
[
'nums'
].
text
=
`(-
${
data
.
nextTimeNeedCoin
}
`
;
this
[
'status2'
].
text
=
`免费次数:
${
data
.
remainTimes
}
次`
;
});
console
.
log
(
data
)
this
.
updateOption
(
data
.
option
);
}
updateOption
(
option
:
any
)
{
const
{
categoryType
}
=
option
;
}
playBgAni
()
{
...
...
@@ -45,7 +61,7 @@ export default class TurnPrizePanel extends Panel {
console
.
log
(
'再来一次'
);
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turntable.svga'
).
then
(
async
(
mv
:
any
)
=>
{
// await wait(100);
PanelCtrl
.
instance
.
show
(
'turnTable'
,
{
onceAgain
:
1
,
mv
:
mv
});
PanelCtrl
.
instance
.
show
(
'turnTable'
,
{
onceAgain
:
1
,
mv
:
mv
});
});
}
onTap_btn2
()
{
...
...
mock/happyclear/turnablebaseInfo.json
View file @
1d86372f
...
...
@@ -40,9 +40,9 @@
}
]
},
"remainTimes"
:
0
,
"remainTimes"
:
11
,
"costCoinJoinTimes"
:
10
,
"nextTimeNeedCoin"
:
10000
"nextTimeNeedCoin"
:
999999
},
"desc"
:
"OK"
,
"success"
:
true
,
...
...
mock/happyclear/turnabledojoin.json
View file @
1d86372f
{
"code"
:
"6000
51
"
,
"code"
:
"6000
15
"
,
"data"
:{
"isScratchCard"
:
false
,
"option"
:{
...
...
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