TnuaHasTargetEntity

Trait TnuaHasTargetEntity 

Source
pub trait TnuaHasTargetEntity: TnuaScheme {
    // Required method
    fn target_entity(action_state: &Self::ActionState) -> Option<Entity>;
}
Expand description

Must be implemented by control schemes that want to use TnuaBlipReuseAvoidance or

Required Methods§

Source

fn target_entity(action_state: &Self::ActionState) -> Option<Entity>

The entity used by the given action.

Note that entities are not part of the actions themselves - they are part of the payloads. It’s up to user code to define them in the control scheme for the relevant actions and to pass then when feeding these actions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§