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
986c1c4e
Commit
986c1c4e
authored
Nov 22, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
8bfa5c43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
addGame.ts
src/addGame.ts
+6
-6
No files found.
src/addGame.ts
View file @
986c1c4e
...
@@ -8,12 +8,12 @@ export function addGame(stage: FYGE.Stage) {
...
@@ -8,12 +8,12 @@ export function addGame(stage: FYGE.Stage) {
const
bird
=
stage
.
addChild
(
new
Bird
());
//有加速度
const
bird
=
stage
.
addChild
(
new
Bird
());
//有加速度
bird
.
position
.
set
(
300
,
200
);
bird
.
position
.
set
(
300
,
200
);
bird
.
velocity
=
new
Vector2
(
0
,
0
);
bird
.
velocity
=
new
Vector2
(
0
,
0
);
bird
.
acceleration
=
new
Vector2
(
0
,
.
5
);
bird
.
acceleration
=
new
Vector2
(
0
,
1
);
const
bird2
=
stage
.
addChild
(
new
Bird
());
//无加速度
bird2
.
position
.
set
(
500
,
200
);
bird2
.
velocity
=
new
Vector2
(
0
,
6
);
movableManager
.
add
(
bird
);
movableManager
.
add
(
bird
);
movableManager
.
add
(
bird2
);
stage
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
onclick
);
function
onclick
()
{
bird
.
velocity
.
y
=
-
20
;
}
}
}
\ No newline at end of file
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