Function of Entities
entities.define
Load time only. A definition is a fact about the world.
entities.define(spec: EntitySpec) → EntityDef
Parameters
specEntitySpecReturns
EntityDefUsed in
| Physics, gameplay hooks or persistence | `game.entities.define` and `world.spawn` | Gives a body behavior independent of its appearance. |Displayslocal car = game.entities.define {Displayslocal rocket = game.entities.define {Custom entitieslocal sheep = game.entities.define {Custom entitiesin `game.entities.define`, which answers `"take"` or `"ignore"`.Cancelling events