pub struct GoalSelector {
available_goals: Vec<WrappedGoal>,
disabled_controls: GoalControls,
}Fields§
§available_goals: Vec<WrappedGoal>§disabled_controls: GoalControlsImplementations§
Source§impl GoalSelector
impl GoalSelector
pub const fn new() -> Self
pub fn add_goal<G>(&mut self, priority: i32, goal: G)where
G: Goal + 'static,
pub fn tick(&mut self, mob: &dyn PathfinderMob)
pub fn tick_running_goals( &mut self, mob: &dyn PathfinderMob, force_tick_all_running_goals: bool, )
pub const fn disable_control(&mut self, control: GoalControl)
pub const fn enable_control(&mut self, control: GoalControl)
pub const fn set_control(&mut self, control: GoalControl, enabled: bool)
pub fn running_goal_count(&self) -> usize
pub const fn available_goal_count(&self) -> usize
pub(crate) fn has_running_panic_goal(&self) -> bool
fn can_start_goal(&self, index: usize) -> bool
fn goal_can_be_replaced_for_all_controls(&self, candidate_index: usize) -> bool
fn running_goal_index_for(&self, control: GoalControl) -> Option<usize>
Trait Implementations§
Source§impl Debug for GoalSelector
impl Debug for GoalSelector
Auto Trait Implementations§
impl !RefUnwindSafe for GoalSelector
impl !Sync for GoalSelector
impl !UnwindSafe for GoalSelector
impl Freeze for GoalSelector
impl Send for GoalSelector
impl Unpin for GoalSelector
impl UnsafeUnpin for GoalSelector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>