Skip to main content

Goal

Trait Goal 

Source
pub trait Goal: Send {
    // Required methods
    fn controls(&self) -> GoalControls;
    fn can_use(&mut self, mob: &dyn PathfinderMob) -> bool;

    // Provided methods
    fn can_continue_to_use(&mut self, mob: &dyn PathfinderMob) -> bool { ... }
    fn is_interruptable(&self) -> bool { ... }
    fn is_panic_goal(&self) -> bool { ... }
    fn start(&mut self, _mob: &dyn PathfinderMob) { ... }
    fn stop(&mut self, _mob: &dyn PathfinderMob) { ... }
    fn requires_update_every_tick(&self) -> bool { ... }
    fn tick(&mut self, _mob: &dyn PathfinderMob) { ... }
}

Required Methods§

Source

fn controls(&self) -> GoalControls

Source

fn can_use(&mut self, mob: &dyn PathfinderMob) -> bool

Provided Methods§

Source

fn can_continue_to_use(&mut self, mob: &dyn PathfinderMob) -> bool

Source

fn is_interruptable(&self) -> bool

Source

fn is_panic_goal(&self) -> bool

Source

fn start(&mut self, _mob: &dyn PathfinderMob)

Source

fn stop(&mut self, _mob: &dyn PathfinderMob)

Source

fn requires_update_every_tick(&self) -> bool

Source

fn tick(&mut self, _mob: &dyn PathfinderMob)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§