diff --git a/src/camera.rs b/src/camera.rs index cb1b96d9d3e2652fd6f33eb27b3af0674b9c8071..7aa1a397777a9efd52f06cfde3494e987b8cae9f 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -31,7 +31,7 @@ pub fn lock_camera_to_level<CameraSelector: ReadOnlyWorldQuery>( #[derive(SystemParam)] pub struct CameraBounder<'w, 's, Filter: ReadOnlyWorldQuery + 'static> { - map_query: MapQuery<'w, 's>, + map_query: MapQuery<'w>, query: Query<'w, 's, &'static OrthographicProjection, Filter>, } impl<'w, 's, Filter: ReadOnlyWorldQuery + 'static> CameraBounder<'w, 's, Filter> { diff --git a/src/map_query.rs b/src/map_query.rs index 9c0f3d5e5e683cee0cdb748eac95e7cfa899a1a6..4554d4bfc08b5b450b078b3ed5c2a487eb342817 100644 --- a/src/map_query.rs +++ b/src/map_query.rs @@ -11,11 +11,9 @@ use crate::system::ActiveLevel; use crate::{LdtkLayer, LdtkLevel}; #[derive(SystemParam)] -pub struct MapQuery<'w, 's> { +pub struct MapQuery<'w> { active: Option<Res<'w, ActiveLevel>>, index: Res<'w, LevelIndex>, - #[system_param(ignore)] - _e: PhantomData<&'s ()>, } pub struct InstanceRef<'a> { @@ -81,7 +79,7 @@ impl CameraBounds { } } -impl<'w, 's> MapQuery<'w, 's> { +impl<'w> MapQuery<'w> { // --- We put our logic in static accessors because we might source a level other // --- than the currently active one. 'active' methods are a convenience to // --- call the static accessors on whatever the current level is