UxrDamageEventArgs Class

Damage event parameters.

Inheritance Hierarchy

System.Object
  System.EventArgs
    UltimateXR.Mechanics.Weapons.UxrDamageEventArgs
Namespace: UltimateXR.Mechanics.Weapons
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public class UxrDamageEventArgs : EventArgs


The UxrDamageEventArgs type exposes the following members.

Constructors

NameDescription
Public methodUxrDamageEventArgs(Single, Boolean) Constructor for generic damage.
Public methodUxrDamageEventArgs(UxrActor, UxrActor, RaycastHit, Single, Boolean) Constructor for projectile damage.
Public methodUxrDamageEventArgs(UxrActor, UxrActor, Vector3, Single, Boolean) Constructor for explosive damage.

Properties

NameDescription
Public propertyActorSource Gets the actor that inflicted the damage, or null if the damage didn’t come from any specific actor.
Public propertyActorTarget Gets the actor that received the damage.
Public propertyDamage Gets the amount of damage taken/inflicted.
Public propertyDamageType Gets the type of damage.
Public propertyDies Gets whether the damage will result in the death of the receiving actor.
Public propertyExplosionPosition Gets the source position for explosive damage. Only valid if DamageType is Explosive
Public propertyIsCanceled Gets if the damage was canceled for damage pre-events. Damage post-events cannot be canceled since the damage was already inflicted.
Public propertyRaycastHit Gets the raycast information for projectile hits. Only valid if DamageType is ProjectileHit.

Methods

NameDescription
Public methodCancel Allows pre-events to cancel the damage. post-events can not be cancelled since the damage was already taken.

Extension Methods

NameDescription
Public Extension MethodThrowIfNull Throws an exception if the object is null. (Defined by ObjectExt.)

See Also

Reference

UltimateXR.Mechanics.Weapons Namespace