mojo3d.Entity - nitrologic/monkey2 GitHub Wiki
Class Entity Extends mojo3d:mojo3d.DynamicObject Abstract
The Entity class.
| Fields | |
|---|---|
| Collided | Collided signal. |
| Copied | Copied signal. |
| Destroyed | Destroyed signal. |
| Hidden | Hidden signal. |
| Shown | Shown signal. |
| Constructors | |
|---|---|
| New | Creates a new entity. |
| Properties | |
|---|---|
| Alpha | Master alpha. |
| Basis | World space basis matrix. |
| Children | Array of child entities. (read only) |
| Color | Master color. |
| Components | Array of attached components. (read only) |
| InverseMatrix | Inverse world space transformation matrix. (read only) |
| LastCopy | Last copy. (read only) |
| LocalBasis | Local space basis matrix. |
| LocalMatrix | Local space transformation matrix. |
| LocalPosition | Local space position. |
| LocalScale | Local space scale. |
| Matrix | World space transformation matrix. |
| Name | Entity name. |
| NumChildren | Number of child entities. (read only) |
| Parent | Parent entity. |
| Position | World space position. |
| ReallyVisible | True if entity and all parents are visible. (read only) |
| Scale | World space scale. |
| Seq | Sequence id. (read only) |
| Visible | Visibility flag. |
| Methods | |
|---|---|
| AddComponent | Attaches a component to the entity. |
| Copy | Creates a copy of the entity. |
| Destroy | Destroys the entity and all of its children. |
| Find | Finds an entity with the given name. |
| GetComponent | Gets a component of a given type attached to the entity. |
| GetComponents | |
| NumComponents | Gets the number of components of a given type attached to the entity. |
| Protected methods | |
|---|---|
| CopyTo | Helper method for copying an entity. |
| OnHide | Invoked when entity transitions from visible->hidden. |
| OnShow | Invoked when entity transitions from hidden->visible. |