get
Retrieves the entity with the specified ID. Returns null if the entity does not exist.
Syntax
entities.get(id);
Parameters
| Name | Type | Description | 
|---|---|---|
| id | numberorstring | Entity ID | 
Returns
- EntityManager- The entity with the specified ID or- nullif the entity does not exist.
Example
console.log('player', engine.players.get(1));
Available on: Client Server