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
0ee1c419
Commit
0ee1c419
authored
May 14, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
c0b4c569
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
9 deletions
+35
-9
MapRpeatPart.ts
egret/src/mapScene/MapRpeatPart.ts
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+34
-8
No files found.
egret/src/mapScene/MapRpeatPart.ts
View file @
0ee1c419
...
@@ -29,7 +29,7 @@ export default class MapRpeatPart extends ComponentBase {
...
@@ -29,7 +29,7 @@ export default class MapRpeatPart extends ComponentBase {
icon
[
'nums'
]
=
icon
.
getChildAt
(
0
);
icon
[
'nums'
]
=
icon
.
getChildAt
(
0
);
icon
[
'bmptxt'
]
=
icon
.
getChildAt
(
1
);
icon
[
'bmptxt'
]
=
icon
.
getChildAt
(
1
);
icon
[
'starsp'
]
=
star
;
icon
[
'starsp'
]
=
star
;
icon
.
hide
();
//
icon.hide();
}
}
...
...
egret/src/mapScene/MapScene.ts
View file @
0ee1c419
...
@@ -761,6 +761,8 @@ export default class MapScene extends Scene {
...
@@ -761,6 +761,8 @@ export default class MapScene extends Scene {
break
;
break
;
}
}
}
}
if
(
lidx
<
0
)
lidx
=
0
;
if
(
nidx
<
0
)
nidx
=
0
;
for
(
var
i3
=
lidx
;
i3
<
nidx
;
i3
++
){
for
(
var
i3
=
lidx
;
i3
<
nidx
;
i3
++
){
var
i3mapy
=
this
.
scrollMapy
[
i3
];
var
i3mapy
=
this
.
scrollMapy
[
i3
];
var
i3map
:
any
;
var
i3map
:
any
;
...
@@ -780,8 +782,9 @@ export default class MapScene extends Scene {
...
@@ -780,8 +782,9 @@ export default class MapScene extends Scene {
if
(
i3map
.
y
!=
i3mapy
){
if
(
i3map
.
y
!=
i3mapy
){
i3map
.
y
=
i3mapy
;
i3map
.
y
=
i3mapy
;
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
);
this
.
changePartLevelShow
(
i3map
,
i3startlevel
,
"mid"
);
this
.
changePartLevelShow
(
i3map
,
i3startlevel
,
"mid"
);
console
.
log
(
"局部显示"
,
i3
,
i3mapy
,
i3startlevel
);
}
}
}
}
// this.scrollGroup.addChild(i3map);
// this.scrollGroup.addChild(i3map);
...
@@ -804,6 +807,7 @@ export default class MapScene extends Scene {
...
@@ -804,6 +807,7 @@ export default class MapScene extends Scene {
}
else
if
(
mappartype
==
"bot"
){
}
else
if
(
mappartype
==
"bot"
){
mapnums
=
MapBottomPart
.
LEVEL_NUMS
;
mapnums
=
MapBottomPart
.
LEVEL_NUMS
;
}
}
console
.
log
(
"修改类型"
,
mappartype
,
startlevel
,
mappart
);
var
last_level
=
window
[
'last_level'
];
var
last_level
=
window
[
'last_level'
];
var
homeData
=
getHomeData
();
var
homeData
=
getHomeData
();
for
(
var
i
=
0
;
i
<
mapnums
;
i
++
){
for
(
var
i
=
0
;
i
<
mapnums
;
i
++
){
...
@@ -812,21 +816,42 @@ export default class MapScene extends Scene {
...
@@ -812,21 +816,42 @@ export default class MapScene extends Scene {
icon
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
showToastQd
);
icon
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
showToastQd
);
mappart
.
getTxt
(
i
).
text
=
levelOrder
+
''
;
mappart
.
getTxt
(
i
).
text
=
levelOrder
+
''
;
if
(
levelOrder
>
last_level
){
if
(
levelOrder
>
last_level
){
setGray
(
icon
);
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'icongray_png'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
false
;
icon
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
showToastQd
,
this
);
icon
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
showToastQd
,
this
);
}
else
if
(
levelOrder
<
homeData
.
levels
.
length
){
(
icon
[
'starsp'
]
as
MapStarComp
).
visible
=
false
;
var
leveldata
=
homeData
.
levels
[
levelOrder
];
setGray
(
icon
);
}
else
if
(
levelOrder
<
homeData
.
levels
.
length
+
1
){
icon
.
filters
=
null
;
var
leveldata
=
homeData
.
levels
[
levelOrder
-
1
];
console
.
log
(
"关卡测试:"
+
levelOrder
);
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'icon_png'
;
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'icon_png'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
true
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
true
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
font
=
'nums_fnt'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
font
=
'nums_fnt'
;
(
icon
[
'star
t
sp'
]
as
MapStarComp
).
setStar
(
leveldata
.
stars
);
(
icon
[
'starsp'
]
as
MapStarComp
).
setStar
(
leveldata
.
stars
);
(
icon
[
'star
t
sp'
]
as
MapStarComp
).
visible
=
true
;
(
icon
[
'starsp'
]
as
MapStarComp
).
visible
=
true
;
}
else
if
(
levelOrder
==
homeData
.
levels
.
length
+
1
){
}
else
if
(
levelOrder
==
homeData
.
levels
.
length
+
1
){
icon
.
filters
=
null
;
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'iconnow_png'
;
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'iconnow_png'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
true
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
true
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
font
=
'nums_fnt'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
font
=
'nums_fnt'
;
(
icon
[
'startsp'
]
as
MapStarComp
).
setStar
(
0
);
(
icon
[
'starsp'
]
as
MapStarComp
).
setStar
(
0
);
(
icon
[
'startsp'
]
as
MapStarComp
).
visible
=
true
;
(
icon
[
'starsp'
]
as
MapStarComp
).
visible
=
true
;
this
.
pic
.
x
=
icon
.
x
+
50
;
this
.
pic
.
y
=
icon
.
y
+
37
+
7
;
egret
.
Tween
.
removeTweens
(
this
.
pic
);
egret
.
Tween
.
get
(
this
.
pic
,
{
loop
:
true
})
.
set
({
scaleX
:
1
,
scaleY
:
1
,
alpha
:
1
})
.
to
({
scaleX
:
2
,
scaleY
:
2
,
alpha
:
0
},
1000
).
wait
(
1000
);
}
else
{
icon
.
filters
=
null
;
(
icon
[
'nums'
]
as
eui
.
Image
).
source
=
'icongray_png'
;
(
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
).
visible
=
false
;
(
icon
[
'starsp'
]
as
MapStarComp
).
visible
=
false
;
}
}
if
(
!
icon
.
hasEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
)){
if
(
!
icon
.
hasEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
)){
icon
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
clickIcon
,
this
);
icon
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
clickIcon
,
this
);
...
@@ -835,6 +860,7 @@ export default class MapScene extends Scene {
...
@@ -835,6 +860,7 @@ export default class MapScene extends Scene {
}
}
//点击
//点击
clickIcon
(
e
){
clickIcon
(
e
){
console
.
log
(
e
);
let
icon
=
e
.
target
as
eui
.
Group
;
let
icon
=
e
.
target
as
eui
.
Group
;
let
txt
=
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
;
let
txt
=
icon
[
'bmptxt'
]
as
eui
.
BitmapLabel
;
console
.
log
(
'关卡点击'
,
txt
.
text
);
console
.
log
(
'关卡点击'
,
txt
.
text
);
...
...
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