Struct veloren_common::rtsim::RtSimController
source · pub struct RtSimController {
pub activity: Option<NpcActivity>,
pub actions: VecDeque<NpcAction>,
pub personality: Personality,
pub heading_to: Option<String>,
pub look_dir: Option<Dir>,
}
Expand description
This type is the map route through which the rtsim (real-time simulation)
aspect of the game communicates with the rest of the game. It is analagous
to comp::Controller
in that it provides a consistent interface for
simulation NPCs to control their actions. Unlike comp::Controller
, it is
very abstract and is intended for consumption by both the agent code and the
internal rtsim simulation code (depending on whether the entity is loaded
into the game as a physical entity or not). Agent code should attempt to act
upon its instructions where reasonable although deviations for various
reasons (obstacle avoidance, counter-attacking, etc.) are expected.
Fields§
§activity: Option<NpcActivity>
§actions: VecDeque<NpcAction>
§personality: Personality
§heading_to: Option<String>
§look_dir: Option<Dir>
Implementations§
source§impl RtSimController
impl RtSimController
pub fn with_destination(pos: Vec3<f32>) -> Self
Trait Implementations§
source§impl Clone for RtSimController
impl Clone for RtSimController
source§fn clone(&self) -> RtSimController
fn clone(&self) -> RtSimController
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RtSimController
impl Debug for RtSimController
source§impl Default for RtSimController
impl Default for RtSimController
source§fn default() -> RtSimController
fn default() -> RtSimController
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for RtSimController
impl Send for RtSimController
impl Sync for RtSimController
impl Unpin for RtSimController
impl UnwindSafe for RtSimController
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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.