🐛 bug: fix the multiple jump bug

main
_ 2022-01-09 13:33:38 +00:00
parent 14665512e1
commit e7854f9021
2 changed files with 2 additions and 1 deletions

BIN
crate.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -194,7 +194,8 @@ async fn main () -> Result <()> {
Event::KeyDown { keycode: Some (Keycode::R), .. } => {
game_state.reset_level (&level);
},
Event::KeyDown { keycode: Some (Keycode::Space), .. } => {
Event::KeyDown { keycode: Some (Keycode::Space), repeat: false, .. } => {
debug! ("Space down");
player_wants_to_jump = true;
},