Struct naia_server::EntityRef
source · pub struct EntityRef<E: Copy + Eq + Hash, W: WorldRefType<E>> { /* private fields */ }Expand description
A reference to an Entity being tracked by the Server
Implementations§
source§impl<E: Copy + Eq + Hash, W: WorldRefType<E>> EntityRef<E, W>
impl<E: Copy + Eq + Hash, W: WorldRefType<E>> EntityRef<E, W>
sourcepub fn has_component<R: Replicate>(&self) -> bool
pub fn has_component<R: Replicate>(&self) -> bool
Returns whether or not the Entity has an associated Component
sourcepub fn component<R: Replicate>(&self) -> Option<ReplicaRefWrapper<'_, R>>
pub fn component<R: Replicate>(&self) -> Option<ReplicaRefWrapper<'_, R>>
Gets a Ref to a Component associated with the Entity