Compare commits
2 Commits
865bdc333c
...
dff59fe9cc
Author | SHA1 | Date | |
---|---|---|---|
dff59fe9cc | |||
0774599ef4 |
|
@ -199,17 +199,16 @@ where
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.insert_resource(self.clone())
|
app.insert_resource(self.clone())
|
||||||
.register_type::<SoundIcon>()
|
.register_type::<SoundIcon>()
|
||||||
.add_system(added.in_base_set(CoreSet::PreUpdate))
|
.add_systems((added, reset_timer_on_visibility_gain).in_base_set(CoreSet::PreUpdate))
|
||||||
.add_systems(
|
.add_systems(
|
||||||
(exploration_focus_changed, update::<S>)
|
(exploration_focus_changed, update::<S>)
|
||||||
.chain()
|
.chain()
|
||||||
.in_base_set(CoreSet::PostUpdate),
|
.in_base_set(CoreSet::PreUpdate),
|
||||||
)
|
)
|
||||||
.add_system(
|
.add_system(
|
||||||
exploration_focus_removed
|
exploration_focus_removed
|
||||||
.in_base_set(CoreSet::PostUpdate)
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
.after(exploration_focus_changed),
|
.after(exploration_focus_changed),
|
||||||
)
|
);
|
||||||
.add_system(reset_timer_on_visibility_gain.in_base_set(CoreSet::PostUpdate));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,9 +39,15 @@ fn update(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn removed(mut commands: Commands, mut removed: RemovedComponents<Volumetric>) {
|
fn removed(
|
||||||
|
mut commands: Commands,
|
||||||
|
mut removed: RemovedComponents<Volumetric>,
|
||||||
|
transforms: Query<Entity, (With<Transform>, With<GlobalTransform>)>,
|
||||||
|
) {
|
||||||
for entity in &mut removed {
|
for entity in &mut removed {
|
||||||
commands.entity(entity).insert(TransformBundle::default());
|
if transforms.get(entity).is_ok() {
|
||||||
|
commands.entity(entity).insert(TransformBundle::default());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user