use crate::entity::Handle as EntityHandle; use crate::system::{Metadata as SystemMetadata, Param as SystemParam}; use crate::uid::Uid; use crate::World; #[derive(Debug)] pub struct Obtainer<'world> { world: &'world World, } impl<'world> SystemParam<'world> for Obtainer<'world> { type Input = (); fn new(world: &'world World, _system_metadata: &SystemMetadata) -> Self { Self { world } } } impl Obtainer<'_> { #[must_use] pub fn get_entity(&self, entity_id: Uid) -> Option> { self.world.get_entity(entity_id) } }