new Entity()
Properties:
| Name | Type | Description |
|---|---|---|
components |
Array | The components added to this Entity. They are accessible as properties with the name they
were given when registered with HX.Component.register(name, componentType). For example:
|
worldBounds |
BoundingVolume | The bounding volume for this entity in world coordinates. This does not include children. |
static |
boolean | Whether or not this Entity can move or not. |
messenger |
Messenger | The Messenger to which elements can listen for certain names Signals related to this Entity. |
Methods
-
_bindSkeleton()
-
-
addComponent()
-
Adds a single
Componentobject to the Entity. -
addComponents(components)
-
Adds multiple
Componentobjects to the Entity.Parameters:
Name Type Description componentsArray An array of components to add.
-
clone()
-
-
destroy()
-
-
getComponentByName()
-
Returns the Component with a given name.
-
invalidateBounds()
-
Marks the bounds as invalid, causing them to be recalculated when next queried.
-
removeComponent()
-
Removes a single Component from the Entity.
-
removeComponents(components)
-
Removes multiple
Componentobjects from the Entity.Parameters:
Name Type Description componentsArray A list of components to remove.