onDestroy
This event is triggered when an entity is destroyed.
Parameters
Name | Type | Description |
---|---|---|
entity | EntityManager | The entity that was destroyed. |
Example
engine.players.events.on('onDestroy', player => {
console.log('A player has been destroyed with id: ' + player.id);
});
Available on: Client Server