|
|
|
@ -98,9 +98,11 @@ impl Plugin for Display3dPlugin {
|
|
|
|
.add_systems(
|
|
|
|
.add_systems(
|
|
|
|
Update,
|
|
|
|
Update,
|
|
|
|
continue_title.run_if(
|
|
|
|
continue_title.run_if(
|
|
|
|
in_state(GameState::Title).and_then(not(any_with_component::<Dissolving>)).and_then(
|
|
|
|
in_state(GameState::Title)
|
|
|
|
just_pressed(KeyCode::Enter).or_else(just_pressed(MouseButton::Left)),
|
|
|
|
.and_then(not(any_with_component::<Dissolving>))
|
|
|
|
),
|
|
|
|
.and_then(
|
|
|
|
|
|
|
|
just_pressed(KeyCode::Enter).or_else(just_pressed(MouseButton::Left)),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -1189,7 +1191,10 @@ impl MaterialExtension for DissolveExtension {
|
|
|
|
/// Sets up all pieces to have an associated "dissolve" material ready for capture
|
|
|
|
/// Sets up all pieces to have an associated "dissolve" material ready for capture
|
|
|
|
fn setup_dissolve_materials(
|
|
|
|
fn setup_dissolve_materials(
|
|
|
|
// All entities with materials are candidates for this procedure
|
|
|
|
// All entities with materials are candidates for this procedure
|
|
|
|
events: Query<(Entity, &Handle<StandardMaterial>, Option<&Name>), Added<Handle<StandardMaterial>>>,
|
|
|
|
events: Query<
|
|
|
|
|
|
|
|
(Entity, &Handle<StandardMaterial>, Option<&Name>),
|
|
|
|
|
|
|
|
Added<Handle<StandardMaterial>>,
|
|
|
|
|
|
|
|
>,
|
|
|
|
// Only process newly created pieces (we do not delete pieces at runtime)
|
|
|
|
// Only process newly created pieces (we do not delete pieces at runtime)
|
|
|
|
query: Query<Entity, (With<Dissolvable>, Added<Children>)>,
|
|
|
|
query: Query<Entity, (With<Dissolvable>, Added<Children>)>,
|
|
|
|
// Children of pieces are the actual meshes that need materials
|
|
|
|
// Children of pieces are the actual meshes that need materials
|
|
|
|
@ -1346,19 +1351,13 @@ fn monitor_animations(
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn intro_title_dissolve(
|
|
|
|
fn intro_title_dissolve(mut query: Query<Entity, With<TitleText>>, mut commands: Commands) {
|
|
|
|
mut query: Query<Entity, With<TitleText>>,
|
|
|
|
|
|
|
|
mut commands: Commands,
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
commands.entity(entity).insert(Dissolving::In(3.0));
|
|
|
|
commands.entity(entity).insert(Dissolving::In(3.0));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn outro_title_dissolve(
|
|
|
|
fn outro_title_dissolve(mut query: Query<Entity, With<TitleText>>, mut commands: Commands) {
|
|
|
|
mut query: Query<Entity, With<TitleText>>,
|
|
|
|
|
|
|
|
mut commands: Commands,
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
query.iter_mut().for_each(|entity| {
|
|
|
|
commands.entity(entity).insert(Dissolving::Out(3.0));
|
|
|
|
commands.entity(entity).insert(Dissolving::Out(3.0));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|