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
b56b7f3a
Commit
b56b7f3a
authored
Nov 05, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e6efb93b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
MapScene.ts
egret/src/mapScene/MapScene.ts
+8
-1
config.js
mock/config.js
+1
-1
home.json
mock/happyclear/home.json
+10
-0
mapRank.json
mock/happyclear/mapRank.json
+1
-1
No files found.
egret/src/mapScene/MapScene.ts
View file @
b56b7f3a
...
...
@@ -196,7 +196,7 @@ export default class MapScene extends Scene {
if
(
!
element
.
hasEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
)){
element
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
if
(
(
levelOrder
>
(
homeData
.
levels
.
length
+
1
)
&&
levelOrder
>
1
)
(
levelOrder
>
(
getHomeData
()
.
levels
.
length
+
1
)
&&
levelOrder
>
1
)
||
(
levelOrder
>
window
[
'last_level'
])
)
{
// showToast('必须通关前面的关卡才能开启本关');
...
...
@@ -354,6 +354,11 @@ export default class MapScene extends Scene {
}
this
.
scroll
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
_avatarsCache
.
forEach
((
item
)
=>
{
if
(
item
.
parent
)
item
.
parent
.
removeChild
(
item
);
});
this
.
_avatarsCache
=
null
;
}
getScrollV
(
lastOrder
,
stageHeight
)
{
...
...
@@ -430,6 +435,7 @@ export default class MapScene extends Scene {
this
.
updateSign
();
}
private
_avatarsCache
=
[];
addAvatar
(
level
,
ele
?)
{
const
item
=
MapScene
.
iconHash
[
level
];
const
parent
=
item
[
'mappart'
];
...
...
@@ -442,6 +448,7 @@ export default class MapScene extends Scene {
if
(
!
MapScene
.
starHash
[
level
].
visible
)
{
avatar
.
y
=
item
.
y
-
avatar
.
height
;
}
this
.
_avatarsCache
.
push
(
avatar
);
}
updateFriends
()
{
...
...
mock/config.js
View file @
b56b7f3a
...
...
@@ -46,7 +46,7 @@ const config = {
data
:
'./happyclear/openTreasureBox.json'
},
'/customActivity/happyclear/home'
:
{
data
:
'./happyclear/home
max
.json'
data
:
'./happyclear/home.json'
},
'/customActivity/happyclear/getLevelInfo'
:
{
data
:
'./happyclear/getLevelInfo.json'
...
...
mock/happyclear/home.json
View file @
b56b7f3a
...
...
@@ -7,6 +7,16 @@
"wealth"
:
999
,
"totalStars"
:
359
,
"levels"
:
[
{
"levelNum"
:
1
,
"maxScore"
:
47440
,
"stars"
:
3
},
{
"levelNum"
:
2
,
"maxScore"
:
47440
,
"stars"
:
3
}
],
"remainProp"
:
[
{
...
...
mock/happyclear/mapRank.json
View file @
b56b7f3a
...
...
@@ -5,7 +5,7 @@
"timestamp"
:
1571322224593
,
"data"
:
[
{
"levelNum"
:
19
,
"levelNum"
:
21
,
"rank"
:
[
{
"nickName"
:
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