|
|
|
|
@ -93,10 +93,12 @@ impl Plugin for Display3dPlugin {
|
|
|
|
|
.run_if(in_state(DisplayState::Display3d)),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
.add_systems(OnEnter(GameState::Title), intro_title_dissolve)
|
|
|
|
|
.add_systems(OnExit(GameState::Title), outro_title_dissolve)
|
|
|
|
|
.add_systems(
|
|
|
|
|
Update,
|
|
|
|
|
continue_title.run_if(
|
|
|
|
|
in_state(GameState::Title).and_then(
|
|
|
|
|
in_state(GameState::Title).and_then(not(any_with_component::<Dissolving>)).and_then(
|
|
|
|
|
just_pressed(KeyCode::Enter).or_else(just_pressed(MouseButton::Left)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -1344,6 +1346,24 @@ fn monitor_animations(
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn intro_title_dissolve(
|
|
|
|
|
mut query: Query<Entity, With<TitleText>>,
|
|
|
|
|
mut commands: Commands,
|
|
|
|
|
) {
|
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
|
commands.entity(entity).insert(Dissolving::In(3.0));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn outro_title_dissolve(
|
|
|
|
|
mut query: Query<Entity, With<TitleText>>,
|
|
|
|
|
mut commands: Commands,
|
|
|
|
|
) {
|
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
|
commands.entity(entity).insert(Dissolving::Out(3.0));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn continue_title(mut next_state: ResMut<NextState<GameState>>) {
|
|
|
|
|
next_state.set(GameState::Play)
|
|
|
|
|
}
|
|
|
|
|
|