|
|
|
|
@ -173,7 +173,7 @@ impl Plugin for Display3dPlugin {
|
|
|
|
|
fade_title.run_if(any_with_component::<Fading>),
|
|
|
|
|
continue_title
|
|
|
|
|
.run_if(in_state(GameState::Title))
|
|
|
|
|
.run_if(can_continue_title)
|
|
|
|
|
.run_if(not(any_with_component::<Fading>))
|
|
|
|
|
.run_if(just_pressed(KeyCode::Enter).or_else(just_pressed(MouseButton::Left))),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
@ -1231,22 +1231,6 @@ fn monitor_animations(
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn can_continue_title(
|
|
|
|
|
query: Query<&Fading>,
|
|
|
|
|
) -> bool {
|
|
|
|
|
if query.is_empty() {
|
|
|
|
|
true
|
|
|
|
|
} else {
|
|
|
|
|
query.iter().all(|fading| {
|
|
|
|
|
match fading {
|
|
|
|
|
Fading::In(s) | Fading::Out(s) => {
|
|
|
|
|
*s >= 1.0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn continue_title(mut next_state: ResMut<NextState<GameState>>) {
|
|
|
|
|
next_state.set(GameState::Play)
|
|
|
|
|
}
|
|
|
|
|
|