pub struct DamageNumber {
pub value: i32,
pub position: Vec3,
pub velocity: Vec3,
pub scale: f32,
pub color: [f32; 4],
pub lifetime: f32,
pub max_lifetime: f32,
pub crit: bool,
pub element: Option<Element>,
}Expand description
A floating damage number with physics-based arc movement.
Fields§
§value: i32The damage value to display.
position: Vec3World-space position.
velocity: Vec3Current velocity (upward + slight horizontal drift).
scale: f32Display scale (crits are larger).
color: [f32; 4]RGBA colour.
lifetime: f32Remaining lifetime in seconds.
max_lifetime: f32Maximum lifetime.
crit: boolWhether this was a critical hit.
element: Option<Element>Element (for colour).
Implementations§
Source§impl DamageNumber
impl DamageNumber
Trait Implementations§
Source§impl Clone for DamageNumber
impl Clone for DamageNumber
Source§fn clone(&self) -> DamageNumber
fn clone(&self) -> DamageNumber
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 DamageNumber
impl RefUnwindSafe for DamageNumber
impl Send for DamageNumber
impl Sync for DamageNumber
impl Unpin for DamageNumber
impl UnsafeUnpin for DamageNumber
impl UnwindSafe for DamageNumber
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