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
d01ab80f
Commit
d01ab80f
authored
Nov 04, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8ac8b381
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
MapRpeatPart.ts
egret/src/mapScene/MapRpeatPart.ts
+6
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+1
-1
MapTopPart.ts
egret/src/mapScene/MapTopPart.ts
+1
-1
StartScene.ts
egret/src/startScene/StartScene.ts
+1
-1
No files found.
egret/src/mapScene/MapRpeatPart.ts
View file @
d01ab80f
...
...
@@ -2,13 +2,17 @@ import ComponentBase from "../../libs/new_wx/components/ComponentBase";
import
MapTopPart
from
"./MapTopPart"
;
import
MapScene
from
"./MapScene"
;
import
MapStarComp
from
"./MapStarComp"
;
import
{
createData
}
from
"../startScene/StartScene"
;
export
default
class
MapRpeatPart
extends
ComponentBase
{
static
LEVEL_NUMS
=
13
;
private
_index
;
constructor
(
i
)
{
private
_topHeight
;
constructor
(
i
,
topHeight
)
{
super
();
this
.
_index
=
i
;
this
.
_topHeight
=
topHeight
;
createData
()
}
start
()
{
...
...
@@ -28,6 +32,7 @@ export default class MapRpeatPart extends ComponentBase {
star
.
loadSkin
();
star
.
start
();
MapScene
.
starHash
[
levelOrder
]
=
star
;
icon
.
addChild
(
star
);
icon
[
'visibleY'
]
=
this
.
_topHeight
+
this
}
this
[
'animal1'
].
visible
=
this
.
_index
%
2
;
...
...
egret/src/mapScene/MapScene.ts
View file @
d01ab80f
egret/src/mapScene/MapTopPart.ts
View file @
d01ab80f
...
...
@@ -21,7 +21,7 @@ export default class MapTopPart extends ComponentBase {
this
.
removeChild
(
icon
);
icon
[
'mappart'
]
=
this
;
icon
.
show
=
()
=>
{
this
.
addChild
(
icon
)};
console
.
log
(
icon
.
y
)
icon
[
'visibleY'
]
=
icon
.
y
;
}
}
...
...
egret/src/startScene/StartScene.ts
View file @
d01ab80f
...
...
@@ -120,7 +120,7 @@ export const createData = () => {
const
repeatCount
=
getRepeatCount
();
for
(
let
i
=
0
;
i
<
repeatCount
;
i
++
)
{
const
repeat
=
new
MapRpeatPart
(
i
);
const
repeat
=
new
MapRpeatPart
(
i
,
startSceneData
.
top
.
height
);
repeat
.
loadSkin
();
repeat
.
start
();
list
.
push
(
repeat
);
}
...
...
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