pub struct WeaponProfile {
pub mass: f32,
pub length: f32,
pub swing_speed: f32,
pub impact_force: f32,
pub trail_width: f32,
pub trail_segments: usize,
pub element: Option<Element>,
}Expand description
Physical and visual properties that govern how a weapon behaves during swings, impacts, and trail rendering.
Fields§
§mass: f32Mass in kilograms. Affects impact camera shake and knockback.
length: f32Length in metres from grip to tip.
swing_speed: f32Swing speed multiplier (1.0 = baseline sword speed).
impact_force: f32Force applied on contact (Newtons-ish, game units).
trail_width: f32Half-width of the rendered trail ribbon.
trail_segments: usizeNumber of trail segments to spawn per swing.
element: Option<Element>Optional elemental affinity baked into the weapon.
Implementations§
Trait Implementations§
Source§impl Clone for WeaponProfile
impl Clone for WeaponProfile
Source§fn clone(&self) -> WeaponProfile
fn clone(&self) -> WeaponProfile
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for WeaponProfile
impl RefUnwindSafe for WeaponProfile
impl Send for WeaponProfile
impl Sync for WeaponProfile
impl Unpin for WeaponProfile
impl UnsafeUnpin for WeaponProfile
impl UnwindSafe for WeaponProfile
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.