pub struct PlayerEntityCallback {
entity_id: i32,
world: Weak<World>,
}Expand description
Callback for players.
Players are owned by World.players, but the world entity manager still
indexes their live position for lookup and tracking updates.
Fields§
§entity_id: i32§world: Weak<World>Implementations§
Trait Implementations§
Source§impl EntityLevelCallback for PlayerEntityCallback
impl EntityLevelCallback for PlayerEntityCallback
Source§fn validate_move(
&self,
old_pos: DVec3,
new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn validate_move( &self, old_pos: DVec3, new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called before an entity position change is committed.
Source§fn on_move_committed(
&self,
old_pos: DVec3,
new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn on_move_committed( &self, old_pos: DVec3, new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called after an entity position change has been committed.
Source§fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
Called after an entity’s collision bounds change without a position change.
Source§fn on_remove(&self, _reason: RemovalReason)
fn on_remove(&self, _reason: RemovalReason)
Called when entity is removed from the world.
Source§fn allows_local_position_update(&self) -> bool
fn allows_local_position_update(&self) -> bool
Returns whether direct local position writes may bypass lifecycle callbacks.
Auto Trait Implementations§
impl !RefUnwindSafe for PlayerEntityCallback
impl !UnwindSafe for PlayerEntityCallback
impl Freeze for PlayerEntityCallback
impl Send for PlayerEntityCallback
impl Sync for PlayerEntityCallback
impl Unpin for PlayerEntityCallback
impl UnsafeUnpin for PlayerEntityCallback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>