pub struct EntityMessageQueue { /* private fields */ }
Expand description

Queue for entity messages

Implementations§

source§

impl EntityMessageQueue

source

pub fn set_value( &mut self, entity: Entity, component_type: ComponentType, param_id: u32, value: &Value )

Sends a message to an entity to set a value on any of its components.

source

pub fn animate_value_no_reply(&mut self, request: &AnimationRequest)

Starts animating a value, but expect no reply.

source

pub fn animate_value(&mut self, request: &AnimationRequest) -> u64

Starts animating a value

source

pub fn stop_animating_value( &mut self, entity: Entity, component_type: ComponentType, param_id: u32, value: &Value )

Sends a message to an entity to stop animating a value on any of its components.

Note: A value of None means leave it as is

source

pub fn set_active(&mut self, entity: Entity, component_type: ComponentType)

Sends a message to an entity to make a specific component the globally active one if it is a singleton (such as a camera or environment).

In a multiplayer environment, set_active with ComponentType::Camera will activate the specified camera for the host player. Use set_active_for_player for activating a camera for a specific player.

source

pub fn set_active_for_player( &mut self, entity: Entity, component_type: ComponentType, player_id: PlayerId )

Sends a message to an entity to make a specific component the active one for that player. Only works with ComponentType::Camera.

  • player_id: this identifier can be retrieved through the Applet API.
source

pub fn physics_force_at_request( &mut self, entity: Entity, force_type: ForceType, force_mode: ForceMode, force_space: Space, pos_space: Space, vector: Vec3, pos: Vec3 )

Sends a message to an entity to apply a force to its physics rigid body (if available).

Both the force vector and the position the force is applied at can be either local or global, just set force_space and pos_space accordingly.

source

pub fn spatial_query_request(&mut self, request: &SpatialQueryRequest) -> u64

Sends a spatial query request message and return a handle that can be used to poll for a reply.

source

pub fn listen_collisions(&mut self, entity: Entity)

Notifies the system that we’re interested in getting collision events for this specific entity.

source

pub fn listen_triggers(&mut self, entity: Entity)

Notifies the system that we’re interested in getting trigger events for this specific entity.

Trait Implementations§

source§

impl Drop for EntityMessageQueue

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.