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