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
42bdea7c
Commit
42bdea7c
authored
Mar 11, 2021
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10.FlppyBird-创建障碍
parent
6d64c30a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
10.FlppyBird-创建障碍.html
10.FlppyBird-创建障碍/10.FlppyBird-创建障碍.html
+8
-0
10.FlppyBird-创建障碍.md
10.FlppyBird-创建障碍/10.FlppyBird-创建障碍.md
+8
-0
No files found.
10.FlppyBird-创建障碍/10.FlppyBird-创建障碍.html
View file @
42bdea7c
...
...
@@ -137,6 +137,14 @@
const
dis
=
Math
.
random
()
*
80
+
100
;
this
.
down
.
top
=
this
.
up
.
size
.
height
+
dis
;
}
// 这里重写一下size,因为子节点使用绝对定位的不计算入包围盒内,真尴尬
get
size
()
{
return
{
width
:
this
.
up
.
size
.
width
,
height
:
this
.
down
.
top
+
this
.
down
.
size
.
height
}
}
}
/**
...
...
10.FlppyBird-创建障碍/10.FlppyBird-创建障碍.md
View file @
42bdea7c
...
...
@@ -34,6 +34,14 @@ class Pie extends GameObject {
const
dis
=
Math
.
random
()
*
80
+
100
;
this
.
down
.
top
=
this
.
up
.
size
.
height
+
dis
;
}
// 这里重写一下size,因为子节点使用绝对定位的不计算入包围盒内,真尴尬
get
size
()
{
return
{
width
:
this
.
up
.
size
.
width
,
height
:
this
.
down
.
top
+
this
.
down
.
size
.
height
}
}
}
```
...
...
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