Skip to main content

Class: EntityDieAfterEventSignal

Supports registering for an event that fires after an entity has died.

Constructors

new EntityDieAfterEventSignal()

private new EntityDieAfterEventSignal(): EntityDieAfterEventSignal

Returns

EntityDieAfterEventSignal

Methods

subscribe()

subscribe(callback, options?): (arg) => void

Parameters

ParameterTypeDescription
callback(arg) => voidFunction to call when an entity dies.
options?EntityEventOptionsAdditional filtering options for when the subscription
fires.

Returns

Function

Returns the closure that can be used in future downstream calls to unsubscribe.

Parameters
ParameterType
argEntityDieAfterEvent
Returns

void

Remarks

Subscribes to an event that fires when an entity dies.

This function can't be called in read-only mode.


unsubscribe()

unsubscribe(callback): void

Parameters

ParameterType
callback(arg) => void

Returns

void

Remarks

Stops this event from calling your function when an entity dies.

This function can't be called in read-only mode.

Throws

This function can throw errors.