Skip to content
Snippets Groups Projects
Verified Commit ec4a4968 authored by Louis's avatar Louis :fire:
Browse files

Update system param lifetimes

parent 9dfa9429
No related branches found
No related tags found
No related merge requests found
......@@ -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> {
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment