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