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
5289f81a
Commit
5289f81a
authored
Mar 10, 2021
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
08.FlppyBird-模拟重力
parent
41481088
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
08.FlppyBird-模拟重力.html
08.FlppyBird-模拟重力/08.FlppyBird-模拟重力.html
+2
-2
08.FlppyBird-模拟重力.md
08.FlppyBird-模拟重力/08.FlppyBird-模拟重力.md
+2
-2
background.png
images/bird/background.png
+0
-0
No files found.
08.FlppyBird-模拟重力/08.FlppyBird-模拟重力.html
View file @
5289f81a
...
...
@@ -51,10 +51,10 @@
this
.
speed
=
speed
;
// 保存speed
this
.
gravity
=
gravity
;
// 保存gravity
// 放到
屏幕中间
// 放到
合适的位置
const
{
width
,
height
}
=
this
.
getSize
();
this
.
setPosition
(
(
winSize
.
height
-
height
)
/
2
,
(
winSize
.
height
-
height
)
/
2
-
100
,
(
winSize
.
width
-
width
)
/
2
,
);
}
...
...
08.FlppyBird-模拟重力/08.FlppyBird-模拟重力.md
View file @
5289f81a
...
...
@@ -25,10 +25,10 @@ class Bird extends GameObject {
this
.
speed
=
speed
;
// 保存speed
this
.
gravity
=
gravity
;
// 保存gravity
// 放到
屏幕中间
// 放到
合适的位置
const
{
width
,
height
}
=
this
.
getSize
();
this
.
setPosition
(
(
winSize
.
height
-
height
)
/
2
,
(
winSize
.
height
-
height
)
/
2
-
100
,
(
winSize
.
width
-
width
)
/
2
,
);
}
...
...
images/bird/background.png
View replaced file @
41481088
View file @
5289f81a
8.18 KB
|
W:
|
H:
11.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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