Struct naia_shared::EntityActionReceiver
source · pub struct EntityActionReceiver<E: Copy + Hash + Eq> { /* private fields */ }Implementations§
source§impl<E: Copy + Hash + Eq> EntityActionReceiver<E>
impl<E: Copy + Hash + Eq> EntityActionReceiver<E>
pub fn new() -> Self
sourcepub fn buffer_action(
&mut self,
action_index: ActionIndex,
action: EntityAction<E>
)
pub fn buffer_action( &mut self, action_index: ActionIndex, action: EntityAction<E> )
Buffer a read EntityAction so that it can be processed later
sourcepub fn receive_actions(&mut self) -> Vec<EntityAction<E>>
pub fn receive_actions(&mut self) -> Vec<EntityAction<E>>
Read all buffered EntityAction inside the receiver and process them.
Outputs the list of EntityAction that can be executed now, buffer the rest
into each entity’s [EntityChannel]