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
a8279b28
Commit
a8279b28
authored
May 13, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化map暂存
parent
4c007df4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
MapScene.ts
egret/src/mapScene/MapScene.ts
+23
-2
No files found.
egret/src/mapScene/MapScene.ts
View file @
a8279b28
...
...
@@ -57,6 +57,10 @@ export default class MapScene extends Scene {
private
icons
=
{};
private
actIcon
:
ActIcon
=
null
;
maptoppart
:
MapTopPart
;
onemapreppart
:
MapRpeatPart
;
twomapreppart
:
MapRpeatPart
;
mapbotpart
:
MapBottomPart
;
private
sendInvite
(
panels
:
any
[],
parmas
:
any
[])
{
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
)
||
Utils
.
getRequestByKey
(
'token'
);
//0224新加用token取一边
if
(
!
code
)
return
false
;
...
...
@@ -249,6 +253,18 @@ export default class MapScene extends Scene {
//进度条文本发光
setGlow
(
this
[
'totalStarTxt'
],
0x0083e8
,
1
);
//新地图创建
var
total_level
=
window
[
'total_level'
];
var
maptop_level
=
MapTopPart
.
LEVEL_NUMS
;
var
maprep_level
=
MapRpeatPart
.
LEVEL_NUMS
;
var
mapbot_level
=
MapBottomPart
.
LEVEL_NUMS
;
var
maptop_height
=
console
.
log
(
'地图数据-----'
,
this
.
_data
);
this
.
topPart
=
this
.
_data
.
top
;
this
.
repeatsPart
=
this
.
_data
.
list
;
this
.
bottomPart
=
this
.
_data
.
bottom
;
...
...
@@ -328,6 +344,10 @@ export default class MapScene extends Scene {
constructor
(
data
?){
super
();
this
.
_data
=
data
;
this
.
maptoppart
=
new
MapTopPart
();
this
.
onemapreppart
=
new
MapRpeatPart
();
this
.
twomapreppart
=
new
MapRpeatPart
();
this
.
mapbotpart
=
new
MapBottomPart
();
this
.
once
(
egret
.
Event
.
ADDED_TO_STAGE
,
this
.
initMapScene
,
this
);
}
...
...
@@ -617,7 +637,8 @@ export default class MapScene extends Scene {
// loadFireworks();
this
.
scroll
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
// this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
this
.
scroll
.
addEventListener
(
egret
.
Event
.
CHANGE
,
this
.
onEnterFrame
,
this
);
}
onAllPanelHide
=
()
=>
{
...
...
@@ -645,7 +666,7 @@ export default class MapScene extends Scene {
const
offset
=
0
;
const
y0
=
this
.
scroll
.
viewport
.
scrollV
+
offset
;
const
y1
=
this
.
stage
.
stageHeight
+
this
.
scroll
.
viewport
.
scrollV
-
offset
;
//
console.log(y0, y1);
console
.
log
(
y0
,
y1
);
let
count
=
0
;
for
(
const
key
in
MapScene
.
iconHash
)
{
const
icon
=
MapScene
.
iconHash
[
key
];
...
...
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