Skip to main content

ItemSteerable

Trait ItemSteerable 

Source
pub trait ItemSteerable: Entity {
    // Required methods
    fn item_based_steering(&self) -> &SyncMutex<ItemBasedSteering>;
    fn boost_time_total(&self) -> i32;
    fn set_boost_time_total(&self, boost_time_total: i32);

    // Provided methods
    fn boost(&self) -> bool { ... }
    fn tick_boost(&self) { ... }
    fn boost_factor(&self) -> f32 { ... }
}
Expand description

Entity behavior for vanilla ItemSteerable.

Required Methods§

Source

fn item_based_steering(&self) -> &SyncMutex<ItemBasedSteering>

Returns the shared runtime steering state.

Source

fn boost_time_total(&self) -> i32

Returns the synced vanilla boostTimeTotal.

Source

fn set_boost_time_total(&self, boost_time_total: i32)

Sets the synced vanilla boostTimeTotal.

Provided Methods§

Source

fn boost(&self) -> bool

Attempts to start an item-steering boost.

Source

fn tick_boost(&self)

Advances the active item-steering boost.

Source

fn boost_factor(&self) -> f32

Returns vanilla ItemBasedSteering.boostFactor.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§