Struct ark_api::world::EntityMessageQueue
source · [−]pub struct EntityMessageQueue { /* private fields */ }
Expand description
Queue for entity messages
Implementations
sourceimpl EntityMessageQueue
impl EntityMessageQueue
sourcepub fn set_value(
&mut self,
entity: Entity,
component_type: ComponentType,
param_id: u32,
value: &Value
)
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.
sourcepub fn animate_value_no_reply(&mut self, request: &AnimationRequest)
pub fn animate_value_no_reply(&mut self, request: &AnimationRequest)
Starts animating a value, but expect no reply.
sourcepub fn animate_value(&mut self, request: &AnimationRequest) -> u64
pub fn animate_value(&mut self, request: &AnimationRequest) -> u64
Starts animating a value
sourcepub fn stop_animating_value(
&mut self,
entity: Entity,
component_type: ComponentType,
param_id: u32,
value: &Value
)
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
sourcepub fn set_active(&mut self, entity: Entity, component_type: ComponentType)
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.
sourcepub fn set_active_for_player(
&mut self,
entity: Entity,
component_type: ComponentType,
player_id: PlayerId
)
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.
sourcepub 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
)
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.
sourcepub fn spatial_query_request(&mut self, request: &SpatialQueryRequest) -> u64
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.
sourcepub fn listen_collisions(&mut self, entity: Entity)
pub fn listen_collisions(&mut self, entity: Entity)
Notifies the system that we’re interested in getting collision events for this specific entity.
sourcepub fn listen_triggers(&mut self, entity: Entity)
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
Auto Trait Implementations
impl RefUnwindSafe for EntityMessageQueue
impl Send for EntityMessageQueue
impl Sync for EntityMessageQueue
impl Unpin for EntityMessageQueue
impl UnwindSafe for EntityMessageQueue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more