Open smokku opened 4 years ago
Hey all!
If someone is just looking for a quick and snappy solution to this, just change the follow line from:
//main.rs
fn tick(&mut self, ctx: &mut Rltk) {
//snip
gui::MainMenuSelection::NewGame => next_state = RunState::PreRun,
}
to:
//main.rs
fn tick(&mut self, ctx: &mut Rltk) {
//snip
gui::MainMenuSelection::NewGame => {
self.game_over_cleanup();
next_state = RunState::PreRun;
}
}
The source code for game_over_cleanup();
can be found in Chapter 14!
Chapter 11:
Player returns to existing game state, instead of "New Game" state.