pub trait TnuaCrouchEnforcedAction: TnuaAction + Clone {
// Required methods
fn range_to_cast_up(&self, state: &Self::State) -> Float;
fn prevent_cancellation(&mut self);
}
Expand description
An action that can be enforced by TnuaCrouchEnforcer
.
Required Methods§
Sourcefn range_to_cast_up(&self, state: &Self::State) -> Float
fn range_to_cast_up(&self, state: &Self::State) -> Float
The range, from the sensor’s offset (as set by TnuaCrouchEnforcer::new
), to check for a
ceiling. If the sensor finds anything within that range - the crouch will be enforced.
Sourcefn prevent_cancellation(&mut self)
fn prevent_cancellation(&mut self)
Modify the action so that it won’t be cancellable by another action.
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.