Class: Entity

Entity

new Entity()

Basic component-driven object with facade function for interacting with the injected EntityManager object.
Source:

Methods

addComponent(TComponent) → {Entity}

Parameters:
Name Type Description
TComponent function
Source:
Returns:
This entity.
Type
Entity

addTag(tag) → {Entity}

Parameters:
Name Type Description
tag String
Source:
Returns:
This entity.
Type
Entity

hasAllComponents(Components) → {boolean}

Parameters:
Name Type Description
Components Array.<function()>
Source:
Returns:
True if entity has all Components.
Type
boolean

hasComponent(TComponent) → {boolean}

Parameters:
Name Type Description
TComponent function
Source:
Returns:
True if this entity has TComponent.
Type
boolean

hasTag(tag) → {boolean}

Parameters:
Name Type Description
tag String
Source:
Returns:
True if entity has tag.
Type
boolean

remove() → {void}

Source:
Returns:
Type
void

removeComponent(TComponent) → {Entity}

Parameters:
Name Type Description
TComponent function
Source:
Returns:
This entity.
Type
Entity

removeTag(tag) → {Entity}

Parameters:
Name Type Description
tag String
Source:
Returns:
This entity.
Type
Entity