Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guangjun Jia
FlappyBird
Commits
3df72aea
"src/main/vscode:/vscode.git/clone" did not exist on "1f526b0cb8eff4bf3a7b9442a8bf8a834529330e"
Unverified
Commit
3df72aea
authored
Feb 09, 2021
by
Kingyu
Committed by
GitHub
Feb 09, 2021
Browse files
Merge pull request #10 from jinmu333/master
fix: wrong value of keycode
parents
eb44ec32
de7e2089
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/kingyu/flappybird/app/Game.java
View file @
3df72aea
...
...
@@ -66,7 +66,7 @@ public class Game extends Frame {
class
BirdKeyListener
implements
KeyListener
{
// 按键按下,根据游戏当前的状态调用不同的方法
public
void
keyPressed
(
KeyEvent
e
)
{
int
keycode
=
e
.
getKeyC
har
();
int
keycode
=
e
.
getKeyC
ode
();
switch
(
gameState
)
{
case
GAME_READY:
if
(
keycode
==
KeyEvent
.
VK_SPACE
)
{
...
...
Write
Preview
Supports
Markdown
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