Better broadcasting. You can simply do state.broadcast(&packet, options); and it broadcasts to either: All entities, or specifically the entities mentioned with the BroadcastOptions::default().only(entities);. Can also have both Sync and Async callbacks using
BroadcastOptions::default().with_async_callback(|entity, state| async move {
// do whatever
});
Or for Sync callbaks
BroadcastOptions::default().with_sync_callback(move |entity, state| {
// do whatever
});
Better broadcasting. You can simply do
state.broadcast(&packet, options);
and it broadcasts to either: All entities, or specifically the entities mentioned with theBroadcastOptions::default().only(entities);
. Can also have bothSync
andAsync
callbacks usingOr for
Sync
callbaks