Edited ReadMe and changed some keybinds to prevent the game from restarting instantly

This commit is contained in:
2022-05-09 16:06:33 +02:00
parent 9601dd1360
commit 06d5ec4b1c
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -39,6 +39,7 @@ You can also just enter ``` cargo build --release ```` and then start the binary
## How to play ? ## How to play ?
This is a local multiplayer game, so two players can play using the same keyboard, player 1 uses 'w' and 's' and so player 2 uses the arrow keys. This is a local multiplayer game, so two players can play using the same keyboard, player 1 uses 'w' and 's' and so player 2 uses the arrow keys.
For now there is no leaderboard or score, so whenever someone looses, the game is over and the window closes. For now there is no leaderboard or music or sound effects but im working on it :)
Check on updates, I might add thoses features soon ! Check on updates, I might add features soon !
+3 -3
View File
@@ -191,16 +191,16 @@ impl State for GameState{
} }
} }
GameStatus::Pause =>{ GameStatus::Pause =>{
self.score_text.set_content("Remember \nPlayer 1 uses 'w' and 's'\nPlayer 2 uses up and down arrow keys\nPress Enter to start the game"); self.score_text.set_content("Remember \nPlayer 1 uses 'w' and 's'\nPlayer 2 uses up and down arrow keys\nPress Space to start the game");
if input::is_key_down(ctx, Key::Enter){ if input::is_key_down(ctx, Key::Space){
self.state = GameStatus::Playing; self.state = GameStatus::Playing;
} }
} }
GameStatus::Ended =>{ GameStatus::Ended =>{
if input::is_key_down(ctx, Key::Enter){ if input::is_key_down(ctx, Key::Enter){
self.restart(); self.restart();
println!("DEBUG: game restarted"); //println!("DEBUG: game restarted");
} }
} }
} }