pub enum AgentState {
Idle,
ReachedTarget,
ReachedAnimationLink,
UsingAnimationLink,
Moving,
AgentNotOnNavMesh,
TargetNotOnNavMesh,
NoPath,
Paused,
}Expand description
The state of an agent.
Variants§
Idle
The agent is idle, due to not having a target. Note this does not mean that they are motionless. An agent will still avoid nearby agents.
ReachedTarget
The agent has reached their target. The agent may resume moving if the target moves or otherwise changes.
ReachedAnimationLink
The agent has reached an animation link along its path to the target.
See Agent::reached_animation_link for details about the link.
UsingAnimationLink
The agent is currently using an animation link.
Moving
The agent has a path and is moving towards their target.
The agent is not on a nav mesh.
The target is not on a nav mesh.
NoPath
The agent has a target but cannot find a path to it.
Paused
The agent is paused.
Trait Implementations§
Source§impl Clone for AgentState
impl Clone for AgentState
Source§fn clone(&self) -> AgentState
fn clone(&self) -> AgentState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AgentState
Source§impl Debug for AgentState
impl Debug for AgentState
impl Eq for AgentState
Source§impl PartialEq for AgentState
impl PartialEq for AgentState
Source§fn eq(&self, other: &AgentState) -> bool
fn eq(&self, other: &AgentState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AgentState
Auto Trait Implementations§
impl Freeze for AgentState
impl RefUnwindSafe for AgentState
impl Send for AgentState
impl Sync for AgentState
impl Unpin for AgentState
impl UnsafeUnpin for AgentState
impl UnwindSafe for AgentState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more