Interface IEntity
Defines the contract for basic ECS implementation.
Namespace: Exiled.API.Features.Core.Interfaces
Assembly: Exiled.API.dll
Syntax
public interface IEntity
Properties
| Improve this Doc View SourceComponentsInChildren
Gets a System.Collections.Generic.IReadOnlyCollection<T> of EActor containing all the components in children.
Declaration
IReadOnlyCollection<EActor> ComponentsInChildren { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<EActor> |
Methods
| Improve this Doc View SourceAddComponent(Type, String)
Adds a component to the IEntity.
Declaration
EActor AddComponent(Type type, string name = "")
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to be added. |
System.String | name | The name of the component. |
Returns
Type | Description |
---|---|
EActor | The added EActor component. |
AddComponent<T>(String)
Adds a component to the IEntity.
Declaration
T AddComponent<T>(string name = "")
where T : EActor
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the component. |
Returns
Type | Description |
---|---|
T | The added EActor component. |
Type Parameters
Name | Description |
---|---|
T | The |
AddComponent<T>(Type, String)
Adds a component from the IEntity.
Declaration
T AddComponent<T>(Type type, string name = "")
where T : EActor
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to be added. |
System.String | name | The name of the component. |
Returns
Type | Description |
---|---|
T | The added EActor component. |
Type Parameters
Name | Description |
---|---|
T | The |
GetComponent(Type)
Gets a component from the IEntity.
Declaration
EActor GetComponent(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to look for. |
Returns
Type | Description |
---|---|
EActor | The EActor component. |
GetComponent<T>()
Gets a component from the IEntity.
Declaration
T GetComponent<T>()
where T : EActor
Returns
Type | Description |
---|---|
T | The EActor component. |
Type Parameters
Name | Description |
---|---|
T | The |
GetComponent<T>(Type)
Gets a component from the IEntity.
Declaration
T GetComponent<T>(Type type)
where T : EActor
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to look for. |
Returns
Type | Description |
---|---|
T | The EActor component. |
Type Parameters
Name | Description |
---|---|
T | The cast |
HasComponent(Type, Boolean)
Checks if the IEntity has an active component.
Declaration
bool HasComponent(Type type, bool depthInheritance = false)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The EActor to look for. |
System.Boolean | depthInheritance | A value indicating whether or not subclasses should be considered. |
Returns
Type | Description |
---|---|
System.Boolean | true if the component was found; otherwise, false. |
HasComponent<T>(Boolean)
Checks if the IEntity has an active component.
Declaration
bool HasComponent<T>(bool depthInheritance = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | depthInheritance | A value indicating whether or not subclasses should be considered. |
Returns
Type | Description |
---|---|
System.Boolean | true if the component was found; otherwise, false. |
Type Parameters
Name | Description |
---|---|
T | The EActor to look for. |
TryGetComponent(Type, out EActor)
Tries to get a component from the IEntity.
Declaration
bool TryGetComponent(Type type, out EActor component)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to get. |
EActor | component | The found component. |
Returns
Type | Description |
---|---|
System.Boolean | true if the component was found; otherwise, false. |
TryGetComponent<T>(out T)
Tries to get a component from the IEntity.
Declaration
bool TryGetComponent<T>(out T component)
where T : EActor
Parameters
Type | Name | Description |
---|---|---|
T | component | The |
Returns
Type | Description |
---|---|
System.Boolean | true if the component was found; otherwise, false. |
Type Parameters
Name | Description |
---|---|
T | The |
TryGetComponent<T>(Type, out T)
Tries to get a component from the IEntity.
Declaration
bool TryGetComponent<T>(Type type, out T component)
where T : EActor
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The System.Type of the EActor to get. |
T | component | The found component. |
Returns
Type | Description |
---|---|
System.Boolean | true if the component was found; otherwise, false. |
Type Parameters
Name | Description |
---|---|
T | The cast |