Base class for Entity and Component types, implementing manipulation and accessing of child entities or components.
More...
|
Entity | CreateChild () |
| Creates a new Entity parented to this one. More...
|
|
TComponent | CreateChildWithComponent< TComponent > () |
| Creates a new Entity parented to this one with a component of the given type, which is returned. More...
|
|
Entity | FindChild (string name, bool recurse=true) |
| Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. Null is returned if no matches are found. More...
|
|
TComponent | FindChildComponent< TComponent > (string name, bool recurse=true) |
| Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. If a matching Entity is found, a component of the given type is retrieved from it. Null is returned if no matches are found. More...
|
|
Entity | FindParent (string name) |
| Attempts to find an Entity that contains this Object's Entity with the given Name. Returns null if no match is found. More...
|
|
TComponent | FindParentComponent< TComponent > () |
| Attempts to find an Entity that contains this Object's Entity with a component of the given type. If a matching Entity is found, the component of the given type is retrieved from it. Returns null if no match is found. More...
|
|
TComponent | FindParentComponent< TComponent > (string name) |
| Attempts to find an Entity that contains this Object's Entity with the given Name. If a matching Entity is found, a component of the given type is retrieved from it. Returns null if no match is found. More...
|
|
TComponent | AddComponent< TComponent > () |
| Adds a component of the specified type to this entity, returning the new component. More...
|
|
TComponent | GetOrAddComponent< TComponent > () |
| Attempts to get a component of the specified type from this entity, adding it if one doesn't already exist. More...
|
|
TComponent | GetComponent< TComponent > () |
| Attempts to get a component of the specified type from this entity, returning null if one doesn't exist. More...
|
|
IEnumerable< TComponent > | GetComponents< TComponent > () |
| Gets all components derived from the given type. More...
|
|
Base class for Entity and Component types, implementing manipulation and accessing of child entities or components.
TComponent Chunks.Entities.Object.AddComponent< TComponent > |
( |
| ) |
|
Adds a component of the specified type to this entity, returning the new component.
- Template Parameters
-
Entity Chunks.Entities.Object.CreateChild |
( |
| ) |
|
Creates a new Entity parented to this one.
TComponent Chunks.Entities.Object.CreateChildWithComponent< TComponent > |
( |
| ) |
|
Creates a new Entity parented to this one with a component of the given type, which is returned.
- Template Parameters
-
TComponent | Type of component to add to the new Entity. |
Entity Chunks.Entities.Object.FindChild |
( |
string |
name, |
|
|
bool |
recurse = true |
|
) |
| |
Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. Null is returned if no matches are found.
- Parameters
-
name | Name of the Entity to find. |
recurse | If true, all children of this entity are recursed through. |
TComponent Chunks.Entities.Object.FindChildComponent< TComponent > |
( |
string |
name, |
|
|
bool |
recurse = true |
|
) |
| |
Attempts to find a child Entity of this one with the given name, and optionally searches recursively through all children. If a matching Entity is found, a component of the given type is retrieved from it. Null is returned if no matches are found.
- Template Parameters
-
TComponent | Type of component to retrieve. |
- Parameters
-
name | Name of the Entity to find. |
recurse | If true, all children of this entity are recursed through. |
Entity Chunks.Entities.Object.FindParent |
( |
string |
name | ) |
|
Attempts to find an Entity that contains this Object's Entity with the given Name. Returns null if no match is found.
- Parameters
-
name | Name of the Entity to find. |
TComponent Chunks.Entities.Object.FindParentComponent< TComponent > |
( |
| ) |
|
Attempts to find an Entity that contains this Object's Entity with a component of the given type. If a matching Entity is found, the component of the given type is retrieved from it. Returns null if no match is found.
- Template Parameters
-
TComponent | Type of component to retrieve. |
TComponent Chunks.Entities.Object.FindParentComponent< TComponent > |
( |
string |
name | ) |
|
Attempts to find an Entity that contains this Object's Entity with the given Name. If a matching Entity is found, a component of the given type is retrieved from it. Returns null if no match is found.
- Template Parameters
-
TComponent | Type of component to retrieve. |
- Parameters
-
name | Name of the Entity to find. |
TComponent Chunks.Entities.Object.GetComponent< TComponent > |
( |
| ) |
|
Attempts to get a component of the specified type from this entity, returning null if one doesn't exist.
- Template Parameters
-
IEnumerable<TComponent> Chunks.Entities.Object.GetComponents< TComponent > |
( |
| ) |
|
Gets all components derived from the given type.
- Template Parameters
-
TComponent Chunks.Entities.Object.GetOrAddComponent< TComponent > |
( |
| ) |
|
Attempts to get a component of the specified type from this entity, adding it if one doesn't already exist.
- Template Parameters
-
abstract bool Chunks.Entities.Object.IsValid |
|
get |
Tests to see if this object hasn't been removed.
virtual string Chunks.Entities.Object.Name |
|
getset |
Custom name associated with this Object's Entity, used to find the Entity in the hierarchy.
virtual Transform Chunks.Entities.Object.Transform |
|
get |
virtual IWorld Chunks.Entities.Object.World |
|
get |
The IWorld that contains this Object.
The documentation for this class was generated from the following file: