From bd303af7450da69267b43a2abe28702574c43852 Mon Sep 17 00:00:00 2001 From: "Elijah C. Voigt" Date: Thu, 29 Feb 2024 20:06:38 -0800 Subject: [PATCH] clicking through animations/intro scroll --- src/display3d.rs | 2 +- src/intro.rs | 25 ++++++++++++++----------- src/tutorial.rs | 5 ++++- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/display3d.rs b/src/display3d.rs index 84f5817..9f32c7d 100644 --- a/src/display3d.rs +++ b/src/display3d.rs @@ -84,7 +84,7 @@ impl Plugin for Display3dPlugin { setup_capture_piece.run_if(any_component_changed::>()), capture_piece.run_if(any_with_component::()), skip_animation - .run_if(just_pressed(KeyCode::Return)) + .run_if(just_pressed(KeyCode::Return).or_else(just_pressed(MouseButton::Left))) .run_if(in_state(GameState::Play)), ), ) diff --git a/src/intro.rs b/src/intro.rs index be3b58e..d360fca 100644 --- a/src/intro.rs +++ b/src/intro.rs @@ -24,7 +24,8 @@ impl Plugin for IntroPlugin { // Updated for as long as there is scrolling text manage_scroll_text_animation.run_if( any_component_added::() - .or_else(just_pressed(KeyCode::Return)), + .or_else(just_pressed(KeyCode::Return)) + .or_else(just_pressed(MouseButton::Left)), ), // Play intro manages playing the intro of each individual paragraph // Runs every time the TextScroll component (managed by manage_scroll_text_animation) is updated @@ -239,6 +240,7 @@ fn scroll_text( tweaks: Res>, time: Res