fix status_changed_to, added OxrSuggestActionBindings event to app and fixed scheduling for run_action_binding_sugestion

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-04-29 18:49:07 +02:00
parent aa0eaa60f4
commit 9cb237e88f
3 changed files with 5 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ pub fn handle_session(
/// A [`Condition`](bevy::ecs::schedule::Condition) that allows the system to run when the xr status changed to a specific [`XrStatus`].
pub fn status_changed_to(status: XrStatus) -> impl FnMut(EventReader<XrStatusChanged>) -> bool + Clone {
move |mut reader: EventReader<XrStatusChanged>| {
reader.read().count() > 0 && reader.read().any(|new_status| new_status.0 == status)
reader.read().any(|new_status| new_status.0 == status)
}
}