Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game-stydy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
谌继荃
game-stydy
Commits
63a07c35
Commit
63a07c35
authored
Mar 11, 2021
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.FlppyBird-对象池
parent
7a4ed3fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
11.FlppyBird-对象池.html
11.FlppyBird-对象池/11.FlppyBird-对象池.html
+6
-3
No files found.
11.FlppyBird-对象池/11.FlppyBird-对象池.html
View file @
63a07c35
...
...
@@ -205,6 +205,9 @@
class
FlppyBird
extends
GameStage
{
bird
;
bgMgr
;
landMgr
;
pieMgr
;
async
preloadRes
()
{
const
path
=
"../images/bird/"
;
...
...
@@ -226,14 +229,14 @@
// 创建背景
const
bg1
=
new
Sprite
(
"../images/bird/background.png"
);
const
bg2
=
new
Sprite
(
"../images/bird/background.png"
);
const
bgMgr
=
new
ScrollMgr
(
bg1
,
bg2
,
2
);
const
bgMgr
=
this
.
bgMgr
=
new
ScrollMgr
(
bg1
,
bg2
,
2
);
// 创建地面
const
land1
=
new
Sprite
(
"../images/bird/land.png"
);
const
land2
=
new
Sprite
(
"../images/bird/land.png"
);
const
landMgr
=
new
ScrollMgr
(
land1
,
land2
,
4
);
const
landMgr
=
this
.
landMgr
=
new
ScrollMgr
(
land1
,
land2
,
4
);
const
pieMgr
=
new
PieMgr
(
4
,
1000
);
// 创建PieMgr
const
pieMgr
=
this
.
pieMgr
=
new
PieMgr
(
4
,
1000
);
// 创建PieMgr
this
.
addChild
(
bgMgr
);
this
.
addChild
(
pieMgr
);
// 加在背景和地面的中间
...
...
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