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
Name | Description | |
---|---|---|
![]() | UxrDamageEventArgs(Single, Boolean) | Constructor for generic damage. |
![]() | UxrDamageEventArgs(UxrActor, UxrActor, RaycastHit, Single, Boolean) | Constructor for projectile damage. |
![]() | UxrDamageEventArgs(UxrActor, UxrActor, Vector3, Single, Boolean) | Constructor for explosive damage. |
Properties
Name | Description | |
---|---|---|
![]() | ActorSource | Gets the actor that inflicted the damage, or null if the damage didn’t come from any specific actor. |
![]() | ActorTarget | Gets the actor that received the damage. |
![]() | Damage | Gets the amount of damage taken/inflicted. |
![]() | DamageType | Gets the type of damage. |
![]() | Dies | Gets whether the damage will result in the death of the receiving actor. |
![]() | ExplosionPosition | Gets the source position for explosive damage. Only valid if DamageType is Explosive |
![]() | IsCanceled | Gets if the damage was canceled for damage pre-events. Damage post-events cannot be canceled since the damage was already inflicted. |
![]() | RaycastHit | Gets the raycast information for projectile hits. Only valid if DamageType is ProjectileHit. |
Methods
Name | Description | |
---|---|---|
![]() | Cancel | Allows pre-events to cancel the damage. post-events can not be cancelled since the damage was already taken. |
Extension Methods
Name | Description | |
---|---|---|
![]() | ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |