fix compile errors after rebase

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-05-31 11:19:13 +02:00
parent 0e2a5dbf66
commit dd1293c0fc

View File

@@ -1,9 +1,9 @@
//! This plugin and module are here to ease the creation of actions withing openxr //! This plugin and module are here to ease the creation of actions withing openxr
//! The general idea is any plugin can create entities in startup before XRUtilsActionSystemSet::CreateEvents //! The general idea is any plugin can create entities in startup before XRUtilsActionSystemSet::CreateEvents
//! this plugin will then create the neccessary actions sets, actions, and bindings and get them ready for use. //! this plugin will then create the neccessary actions sets, actions, and bindings and get them ready for use.
//! //!
//! example creating actions //! example creating actions
//! //!
//! //create a set //! //create a set
//! let set = commands //! let set = commands
//! .spawn(( //! .spawn((
@@ -39,10 +39,10 @@
//! //TODO look into a better system //! //TODO look into a better system
//! commands.entity(action).add_child(binding); //! commands.entity(action).add_child(binding);
//! commands.entity(set).add_child(action); //! commands.entity(set).add_child(action);
//! //!
//! then you can read the action states after XRUtilsActionSystemSet::SyncActionStates //! then you can read the action states after XRUtilsActionSystemSet::SyncActionStates
//! for example //! for example
//! //!
//! fn read_action_with_marker_component( //! fn read_action_with_marker_component(
//! mut action_query: Query<&XRUtilsActionState, With<FlightActionMarker>>, //! mut action_query: Query<&XRUtilsActionState, With<FlightActionMarker>>,
//! ) { //! ) {
@@ -51,13 +51,12 @@
//! info!("action state is: {:?}", state); //! info!("action state is: {:?}", state);
//! } //! }
//! } //! }
//! //!
//! //!
use bevy::prelude::*; use bevy::prelude::*;
use bevy_openxr::{ use bevy_openxr::{
action_binding::OxrSuggestActionBinding, action_binding::OxrSuggestActionBinding, action_set_attaching::OxrAttachActionSet,
action_set_attaching::OxrAttachActionSet, resources::OxrInstance, session::OxrSession,
resources::{OxrInstance, OxrSession},
}; };
use openxr::{ActiveActionSet, Path, Vector2f}; use openxr::{ActiveActionSet, Path, Vector2f};
use std::borrow::Cow; use std::borrow::Cow;
@@ -65,7 +64,10 @@ use std::borrow::Cow;
pub struct XRUtilsActionsPlugin; pub struct XRUtilsActionsPlugin;
impl Plugin for XRUtilsActionsPlugin { impl Plugin for XRUtilsActionsPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_systems(Startup, create_openxr_events.in_set(XRUtilsActionSystemSet::CreateEvents)); app.add_systems(
Startup,
create_openxr_events.in_set(XRUtilsActionSystemSet::CreateEvents),
);
app.add_systems(Update, sync_active_action_sets); app.add_systems(Update, sync_active_action_sets);
app.add_systems( app.add_systems(
Update, Update,