Add a component to this entity.
Returns the component instance for the specified component. Useful if you need to modify values on the component
The constructor of a component
Returns the component instance
The constructor of a component
true | false depending on if this entity has the specified component
Executes the provided function if this entity has the specified component
The constructor of a component
A function to be executed if the entity has the component
Remove a component from this entity.
Generated using TypeDoc
Bundles together one or more components to create a game entity Usage:
const entity = new Entity(); entity.add(new Health(20));