From b6cb7bcf131a5a29bcc03eac3e760ea02b0e467f Mon Sep 17 00:00:00 2001 From: "Elijah C. Voigt" Date: Fri, 23 Feb 2024 22:06:52 -0800 Subject: [PATCH] Add Tutorial button to toggle it on/off --- src/tutorial.rs | 79 +++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/src/tutorial.rs b/src/tutorial.rs index 4b0c4d6..f77175b 100644 --- a/src/tutorial.rs +++ b/src/tutorial.rs @@ -16,15 +16,19 @@ impl Plugin for TutorialPlugin { ) .add_systems( Update, - menu::handle_menu_button::.run_if(in_state(GameState::Play)), + // Toggle the tutorial state iff we are in the play state and the tutorial button was pressed + toggle_tutorial_button.run_if(in_state(GameState::Play).and_then( + |buttons: Query<&Interaction, (With