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
6caf42c1
Commit
6caf42c1
authored
Jun 10, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整map显示
parent
ddd908f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+38
-0
No files found.
egret/src/mapScene/MapScene.ts
View file @
6caf42c1
...
@@ -316,8 +316,10 @@ export default class MapScene extends Scene {
...
@@ -316,8 +316,10 @@ export default class MapScene extends Scene {
}
}
this
.
scrollMapy
.
push
(
smaph
+
mapbot_height
);
this
.
scrollMapy
.
push
(
smaph
+
mapbot_height
);
// console.log(maptop_height,repeatnum,maprep_height,mapbot_height);
var
scrollheight
=
maptop_height
+
repeatnum
*
maprep_height
+
mapbot_height
;
var
scrollheight
=
maptop_height
+
repeatnum
*
maprep_height
+
mapbot_height
;
// console.log("scroll--------height",scrollheight,this.scrollMapy);
// console.log("scroll--------height",scrollheight,this.scrollMapy);
this
.
scroll
.
height
=
this
.
stage
.
stageHeight
;
this
.
scrollGroup
.
height
=
scrollheight
;
this
.
scrollGroup
.
height
=
scrollheight
;
var
nowlevel
=
getHomeData
().
levels
.
length
;
var
nowlevel
=
getHomeData
().
levels
.
length
;
// console.log("玩家level",nowlevel);
// console.log("玩家level",nowlevel);
...
@@ -345,6 +347,7 @@ export default class MapScene extends Scene {
...
@@ -345,6 +347,7 @@ export default class MapScene extends Scene {
if
(
homeData
.
levels
.
length
>=
window
[
'total_level'
])
if
(
homeData
.
levels
.
length
>=
window
[
'total_level'
])
lastOrder
=
window
[
'total_level'
];
lastOrder
=
window
[
'total_level'
];
this
.
scroll
.
viewport
.
scrollV
=
this
.
getScrollV
(
lastOrder
,
this
.
stage
.
stageHeight
);
this
.
scroll
.
viewport
.
scrollV
=
this
.
getScrollV
(
lastOrder
,
this
.
stage
.
stageHeight
);
// console.log("滚动设置",this.scroll.viewport.scrollV,this.scrollGroup.height,this.scroll.height,this.stage.stageHeight);
// console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV);
// console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV);
this
.
setScrollVShow
();
this
.
setScrollVShow
();
// console.log('地图数据-----',this._data);
// console.log('地图数据-----',this._data);
...
@@ -822,13 +825,48 @@ export default class MapScene extends Scene {
...
@@ -822,13 +825,48 @@ export default class MapScene extends Scene {
}
else
{
}
else
{
var
joidx
=
i3
%
2
;
var
joidx
=
i3
%
2
;
//1对应onemapr,0对应twomapr
//1对应onemapr,0对应twomapr
let
onemapy
:
number
;
let
twomapy
:
number
;
let
cmap
:
number
;
let
onemapidx
=
this
.
scrollGroup
.
getChildIndex
(
this
.
onemapreppart
);
let
twomapidx
=
this
.
scrollGroup
.
getChildIndex
(
this
.
twomapreppart
);
let
maxidx
=
Math
.
max
(
onemapidx
,
twomapidx
);
let
minidx
=
Math
.
min
(
onemapidx
,
twomapidx
);
if
(
joidx
==
1
){
if
(
joidx
==
1
){
i3map
=
this
.
onemapreppart
;
i3map
=
this
.
onemapreppart
;
cmap
=
1
;
onemapy
=
this
.
onemapreppart
.
y
;
twomapy
=
this
.
twomapreppart
.
y
;
}
else
{
}
else
{
i3map
=
this
.
twomapreppart
;
i3map
=
this
.
twomapreppart
;
cmap
=
2
;
onemapy
=
this
.
onemapreppart
.
y
;
twomapy
=
this
.
twomapreppart
.
y
;
}
}
if
(
i3map
.
y
!=
i3mapy
){
if
(
i3map
.
y
!=
i3mapy
){
i3map
.
y
=
i3mapy
;
i3map
.
y
=
i3mapy
;
if
(
cmap
==
1
){
if
(
i3mapy
>
twomapy
){
this
.
scrollGroup
.
setChildIndex
(
this
.
onemapreppart
,
maxidx
);
this
.
scrollGroup
.
setChildIndex
(
this
.
twomapreppart
,
minidx
);
}
else
{
this
.
scrollGroup
.
setChildIndex
(
this
.
onemapreppart
,
minidx
);
this
.
scrollGroup
.
setChildIndex
(
this
.
twomapreppart
,
maxidx
);
}
}
else
{
if
(
i3mapy
>
onemapy
){
this
.
scrollGroup
.
setChildIndex
(
this
.
onemapreppart
,
minidx
);
this
.
scrollGroup
.
setChildIndex
(
this
.
twomapreppart
,
maxidx
);
}
else
{
this
.
scrollGroup
.
setChildIndex
(
this
.
onemapreppart
,
maxidx
);
this
.
scrollGroup
.
setChildIndex
(
this
.
twomapreppart
,
minidx
);
}
}
var
i3startlevel
=
MapTopPart
.
LEVEL_NUMS
+
(
i3
-
1
)
*
MapRpeatPart
.
LEVEL_NUMS
;
var
i3startlevel
=
MapTopPart
.
LEVEL_NUMS
+
(
i3
-
1
)
*
MapRpeatPart
.
LEVEL_NUMS
;
// console.log("局部显示",i3,i3mapy,i3startlevel,lidx,nidx);
// console.log("局部显示",i3,i3mapy,i3startlevel,lidx,nidx);
...
...
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