pub trait TnuaBasisWithGround: TnuaBasis {
// Required methods
fn is_airborne(access: &TnuaBasisAccess<'_, Self>) -> bool;
fn violate_coyote_time(memory: &mut Self::Memory);
fn ground_sensor<'a>(sensors: &Self::Sensors<'a>) -> &'a TnuaProximitySensor;
}Expand description
The basis keeps track on the entity the chracter stands on - and whether or not it stands on something.
Required Methods§
Sourcefn is_airborne(access: &TnuaBasisAccess<'_, Self>) -> bool
fn is_airborne(access: &TnuaBasisAccess<'_, Self>) -> bool
Can be queried by an action to determine if the character should be considered “in the air”.
This is a query method, used by the action to determine what the basis thinks.
Sourcefn violate_coyote_time(memory: &mut Self::Memory)
fn violate_coyote_time(memory: &mut Self::Memory)
If the basis is at coyote time - finish the coyote time.
This is typically called by air actions so that a long coyote time will not allow, for
example, unaccounted air jumps. These actions should invoke this method inside their
influence_basis method.
If the character is fully grounded, this method must not change that.
Sourcefn ground_sensor<'a>(sensors: &Self::Sensors<'a>) -> &'a TnuaProximitySensor
fn ground_sensor<'a>(sensors: &Self::Sensors<'a>) -> &'a TnuaProximitySensor
The sensor used to detect the ground.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".