pub struct OnEntityDamagedEvent {
pub cause: LuaEntity,
pub damage_type: LuaDamagePrototype,
pub entity: LuaEntity,
pub final_damage_amount: f32,
pub final_health: f32,
pub force: LuaForce,
pub name: &'static str,
pub original_damage_amount: f32,
pub source: LuaEntity,
pub tick: u32,
}Expand description
Called when an entity is damaged. This is not called when an entities health is set directly by another mod.
Fields§
§cause: LuaEntity§damage_type: LuaDamagePrototype§entity: LuaEntity§final_damage_amount: f32§final_health: f32§force: LuaForce§name: &'static str§original_damage_amount: f32§source: LuaEntity§tick: u32Trait Implementations§
Source§impl Clone for OnEntityDamagedEvent
impl Clone for OnEntityDamagedEvent
Source§fn clone(&self) -> OnEntityDamagedEvent
fn clone(&self) -> OnEntityDamagedEvent
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 OnEntityDamagedEvent
Source§impl Debug for OnEntityDamagedEvent
impl Debug for OnEntityDamagedEvent
Source§impl Default for OnEntityDamagedEvent
impl Default for OnEntityDamagedEvent
Source§fn default() -> OnEntityDamagedEvent
fn default() -> OnEntityDamagedEvent
Returns the “default value” for a type. Read more
Source§impl PartialEq for OnEntityDamagedEvent
impl PartialEq for OnEntityDamagedEvent
impl StructuralPartialEq for OnEntityDamagedEvent
Auto Trait Implementations§
impl Freeze for OnEntityDamagedEvent
impl RefUnwindSafe for OnEntityDamagedEvent
impl Send for OnEntityDamagedEvent
impl Sync for OnEntityDamagedEvent
impl Unpin for OnEntityDamagedEvent
impl UnsafeUnpin for OnEntityDamagedEvent
impl UnwindSafe for OnEntityDamagedEvent
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