diff options
Diffstat (limited to 'ecs/src/actions.rs')
-rw-r--r-- | ecs/src/actions.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ecs/src/actions.rs b/ecs/src/actions.rs index d67f895..edfee55 100644 --- a/ecs/src/actions.rs +++ b/ecs/src/actions.rs @@ -9,7 +9,7 @@ use crate::WorldData; #[derive(Debug)] pub struct Actions<'world> { - world_data: &'world mut WorldData, + world_data: &'world WorldData, } impl<'world> Actions<'world> @@ -19,6 +19,7 @@ impl<'world> Actions<'world> { self.world_data .action_queue + .borrow_mut() .push(Action::Spawn(components.into_vec())); } } @@ -28,13 +29,16 @@ unsafe impl<'world> SystemParam<'world> for Actions<'world> type Flags = NoInitParamFlag; type Input = TupleFilterExclude; - fn initialize<SystemImpl>(_system: &mut impl System<SystemImpl>, _input: Self::Input) + fn initialize<SystemImpl>( + _system: &mut impl System<'world, SystemImpl>, + _input: Self::Input, + ) { } fn new<SystemImpl>( - _system: &'world mut impl System<SystemImpl>, - world_data: &'world mut WorldData, + _system: &'world impl System<'world, SystemImpl>, + world_data: &'world WorldData, ) -> Self { Self { world_data } |