Struct veloren_common::event::NpcBuilder
source · pub struct NpcBuilder {Show 16 fields
pub stats: Stats,
pub skill_set: SkillSet,
pub health: Option<Health>,
pub poise: Poise,
pub inventory: Inventory,
pub body: Body,
pub agent: Option<Agent>,
pub alignment: Alignment,
pub scale: Scale,
pub anchor: Option<Anchor>,
pub loot: LootSpec<String>,
pub pets: Vec<(NpcBuilder, Vec3<f32>)>,
pub rtsim_entity: Option<RtSimEntity>,
pub projectile: Option<Projectile>,
pub heads: Option<Heads>,
pub death_effects: Option<DeathEffects>,
}
Fields§
§stats: Stats
§skill_set: SkillSet
§health: Option<Health>
§poise: Poise
§inventory: Inventory
§body: Body
§agent: Option<Agent>
§alignment: Alignment
§scale: Scale
§anchor: Option<Anchor>
§loot: LootSpec<String>
§pets: Vec<(NpcBuilder, Vec3<f32>)>
§rtsim_entity: Option<RtSimEntity>
§projectile: Option<Projectile>
§heads: Option<Heads>
§death_effects: Option<DeathEffects>
Implementations§
source§impl NpcBuilder
impl NpcBuilder
pub fn new(stats: Stats, body: Body, alignment: Alignment) -> Self
pub fn with_heads(self, heads: impl Into<Option<Heads>>) -> Self
pub fn with_health(self, health: impl Into<Option<Health>>) -> Self
pub fn with_poise(self, poise: Poise) -> Self
pub fn with_agent(self, agent: impl Into<Option<Agent>>) -> Self
pub fn with_anchor(self, anchor: Anchor) -> Self
pub fn with_rtsim(self, rtsim: RtSimEntity) -> Self
pub fn with_projectile(self, projectile: impl Into<Option<Projectile>>) -> Self
pub fn with_scale(self, scale: Scale) -> Self
pub fn with_inventory(self, inventory: Inventory) -> Self
pub fn with_skill_set(self, skill_set: SkillSet) -> Self
pub fn with_loot(self, loot: LootSpec<String>) -> Self
pub fn with_pets(self, pets: Vec<(NpcBuilder, Vec3<f32>)>) -> Self
pub fn with_death_effects(self, death_effects: Option<DeathEffects>) -> Self
Auto Trait Implementations§
impl Freeze for NpcBuilder
impl RefUnwindSafe for NpcBuilder
impl Send for NpcBuilder
impl Sync for NpcBuilder
impl Unpin for NpcBuilder
impl UnwindSafe for NpcBuilder
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>
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