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
421ed1d2
Commit
421ed1d2
authored
Aug 29, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
57f9a61e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
28 deletions
+31
-28
ShareSkin.exml
egret/resource/skins/ShareSkin.exml
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+29
-26
home.json
mock/happyclear/home.json
+1
-1
No files found.
egret/resource/skins/ShareSkin.exml
View file @
421ed1d2
...
...
@@ -2,5 +2,5 @@
<e:Skin
class=
"ShareSkin"
width=
"750"
height=
"1624"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Rect
width=
"750"
height=
"1624"
fillAlpha=
"0.7"
/>
<e:Image
source=
"share2_jpg"
/>
<e:Label
id=
"lvTxt"
text=
"
2"
x=
"336.65"
y=
"918.94"
size=
"20"
anchorOffsetX=
"0"
width=
"42.33"
textAlign=
"center"
verticalAlign=
"middle
"
textColor=
"0xea2917"
/>
<e:Label
id=
"lvTxt"
text=
"
11"
x=
"336.65"
y=
"920.94"
size=
"20"
anchorOffsetX=
"0"
width=
"42.33"
textAlign=
"center
"
textColor=
"0xea2917"
/>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
421ed1d2
...
...
@@ -12,7 +12,6 @@ import { playBg, toggleBg, toggleSound } from "../soundCtrl";
import
MapBottomPart
from
"./MapBottomPart"
;
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
getShowOffPic
from
"../getShowOffPic"
;
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
...
...
@@ -55,11 +54,11 @@ export default class MapScene extends Scene {
let
target
;
const
homeData
=
getHomeData
();
if
(
homeData
.
levels
.
length
==
0
)
{
if
(
homeData
.
levels
.
length
==
0
)
{
target
=
1
;
}
else
if
(
homeData
.
levels
.
length
==
70
)
{
target
=
70
+
1
;
}
else
{
}
else
if
(
homeData
.
levels
.
length
==
70
)
{
target
=
70
+
1
;
}
else
{
target
=
homeData
.
levels
.
length
+
1
;
}
for
(
const
key
in
MapScene
.
iconHash
)
{
...
...
@@ -71,30 +70,34 @@ export default class MapScene extends Scene {
}
else
PanelCtrl
.
instance
.
show
(
'StartPanel'
,
key
);
NetManager
.
ins
.
clickLog
(
getlogItem
(
19
))
},
this
);
},
this
);
}
if
(
homeData
.
levels
.
length
<
70
)
{
if
(
homeData
.
levels
.
length
<
70
)
{
const
targetIcon
=
MapScene
.
iconHash
[
target
];
const
light
=
RES
.
getRes
(
'lightani_png'
);
const
pic
=
new
egret
.
Bitmap
(
light
);
//76 61
// targetIcon.addChild(pic);
targetIcon
.
addChildAt
(
pic
,
0
);
pic
.
anchorOffsetX
=
76
;
pic
.
anchorOffsetY
=
61
;
pic
.
x
=
50
-
2
;
pic
.
y
=
37
+
10
;
egret
.
Tween
.
get
(
pic
,
{
loop
:
true
}).
to
({
scaleX
:
2
,
scaleY
:
2
,
alpha
:
0
},
1000
).
wait
(
1000
);
targetIcon
.
addChildAt
(
pic
,
0
);
pic
.
anchorOffsetX
=
76
;
pic
.
anchorOffsetY
=
61
;
pic
.
x
=
50
-
2
;
pic
.
y
=
37
+
10
;
egret
.
Tween
.
get
(
pic
,
{
loop
:
true
}).
to
({
scaleX
:
2
,
scaleY
:
2
,
alpha
:
0
},
1000
).
wait
(
1000
);
this
[
'pic'
]
=
pic
;
}
this
.
updateHomeData
();
this
.
showLog
();
this
.
updateBox
();
if
(
data
.
level
)
{
PanelCtrl
.
instance
.
show
(
'StartPanel'
,
data
.
level
)
if
(
homeData
.
remainEnargy
==
0
)
PanelCtrl
.
instance
.
show
(
'bloodPanel'
)
else
PanelCtrl
.
instance
.
show
(
'StartPanel'
,
data
.
level
)
}
this
.
stage
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
...
...
@@ -109,14 +112,14 @@ export default class MapScene extends Scene {
lastOrder
=
70
;
this
.
scroll
.
viewport
.
scrollV
=
this
.
getScrollV
(
lastOrder
,
this
.
stage
.
stageHeight
);
// console.warn(this.getScrollV(lastOrder, this.stage.stageHeight))
}
destroy
(){
destroy
()
{
super
.
destroy
();
if
(
this
[
'pic'
])
egret
.
Tween
.
removeTweens
(
this
[
'pic'
]);
if
(
this
[
'pic'
])
egret
.
Tween
.
removeTweens
(
this
[
'pic'
]);
}
getScrollV
(
lastOrder
,
stageHeight
)
{
...
...
@@ -206,15 +209,15 @@ export default class MapScene extends Scene {
this
.
disableIcon
(
level
.
levelNum
);
}
}
if
(
homeData
.
levels
.
length
==
0
)
{
if
(
homeData
.
levels
.
length
==
0
)
{
const
star
=
MapScene
.
starHash
[
1
];
star
.
setStar
(
0
);
this
.
enableIcon
(
1
);
}
else
if
(
homeData
.
levels
.
length
==
70
)
{
}
else
{
const
star
=
MapScene
.
starHash
[
homeData
.
levels
.
length
+
1
];
this
.
enableIcon
(
homeData
.
levels
.
length
+
1
);
}
else
if
(
homeData
.
levels
.
length
==
70
)
{
}
else
{
const
star
=
MapScene
.
starHash
[
homeData
.
levels
.
length
+
1
];
this
.
enableIcon
(
homeData
.
levels
.
length
+
1
);
}
}
...
...
mock/happyclear/home.json
View file @
421ed1d2
...
...
@@ -22,7 +22,7 @@
"num"
:
0
}
],
"remainEnargy"
:
9979
,
"remainEnargy"
:
0
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
0
,
"nextRangeStarsNum"
:
150
...
...
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