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
8bfa5c43
Commit
8bfa5c43
authored
Nov 22, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
39b12899
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
Movable.ts
src/Movable.ts
+1
-0
addGame.ts
src/addGame.ts
+1
-1
No files found.
src/Movable.ts
View file @
8bfa5c43
...
...
@@ -4,6 +4,7 @@ export default class Movable extends FYGE.Sprite {
private
_velocity
:
Vector2
;
set
velocity
(
val
:
Vector2
)
{
this
.
_velocity
=
val
}
get
velocity
()
{
return
this
.
_velocity
}
private
_acceleration
:
Vector2
;
set
acceleration
(
val
:
Vector2
)
{
this
.
_acceleration
=
val
}
...
...
src/addGame.ts
View file @
8bfa5c43
...
...
@@ -7,7 +7,7 @@ export function addGame(stage: FYGE.Stage) {
const
bird
=
stage
.
addChild
(
new
Bird
());
//有加速度
bird
.
position
.
set
(
300
,
200
);
bird
.
velocity
=
new
Vector2
(
0
,
2
);
bird
.
velocity
=
new
Vector2
(
0
,
0
);
bird
.
acceleration
=
new
Vector2
(
0
,
.
5
);
const
bird2
=
stage
.
addChild
(
new
Bird
());
//无加速度
...
...
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