Class: EntityRemoveAfterEventSignal
Allows registration for an event that fires when an entity is removed from the game (for example, unloaded, or a few seconds after they are dead.)
Constructors
new EntityRemoveAfterEventSignal()
private
new EntityRemoveAfterEventSignal():EntityRemoveAfterEventSignal
Returns
Methods
subscribe()
subscribe(
callback
,options
?): (arg
) =>void
Parameters
Parameter | Type | Description |
---|---|---|
callback | (arg ) => void | Function to call. |
options ? | EntityEventOptions | Additional filtering options for this event. |
Returns
Function
Returns a closure that can be used in subsequent unsubscribe operations.
Parameters
Parameter | Type |
---|---|
arg | EntityRemoveAfterEvent |
Returns
void
Remarks
Will call your function every time an entity is removed from the game.
This function can't be called in read-only mode.
unsubscribe()
unsubscribe(
callback
):void
Parameters
Parameter | Type |
---|---|
callback | (arg ) => void |
Returns
void
Remarks
Unsubscribes your function from subsequent calls when an entity is removed.
This function can't be called in read-only mode.
Throws
This function can throw errors.