Show / Hide Table of Contents

Class DamageChangedEvent

Inheritance
System.Object
DamageChangedEvent
Namespace: Content.Shared.Damage
Assembly: Content.Shared.dll
Syntax
public sealed class DamageChangedEvent : EntityEventArgs

Constructors

| Improve this Doc View Source

DamageChangedEvent(DamageableComponent, DamageSpecifier, Boolean, Nullable<EntityUid>)

Declaration
public DamageChangedEvent(DamageableComponent damageable, DamageSpecifier damageDelta, bool interruptsDoAfters, EntityUid? origin)
Parameters
Type Name Description
DamageableComponent damageable
DamageSpecifier damageDelta
System.Boolean interruptsDoAfters
System.Nullable<EntityUid> origin

Fields

| Improve this Doc View Source

Damageable

This is the component whose damage was changed.

Declaration
public readonly DamageableComponent Damageable
Field Value
Type Description
DamageableComponent
Remarks

Given that nearly every component that cares about a change in the damage, needs to know the current damage values, directly passing this information prevents a lot of duplicate Owner.TryGetComponent() calls.

| Improve this Doc View Source

DamageDelta

The amount by which the damage has changed. If the damage was set directly to some number, this will be null.

Declaration
public readonly DamageSpecifier DamageDelta
Field Value
Type Description
DamageSpecifier
| Improve this Doc View Source

DamageIncreased

Was any of the damage change dealing damage, or was it all healing?

Declaration
public readonly bool DamageIncreased
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

InterruptsDoAfters

Does this event interrupt DoAfters? Note: As provided in the constructor, this does not account for DamageIncreased. As written into the event, this does account for DamageIncreased.

Declaration
public readonly bool InterruptsDoAfters
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Origin

Contains the entity which caused the change in damage, if any was responsible.

Declaration
public readonly EntityUid? Origin
Field Value
Type Description
System.Nullable<EntityUid>
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾