Interface IEntity
- Namespace
- Exiled.API.Features.Core.Interfaces
- Assembly
- Exiled.API.dll
Defines the contract for basic ECS implementation.
public interface IEntity- Extension Methods
Properties
ComponentsInChildren
Gets a IReadOnlyCollection<T> of EActor containing all the components in children.
IReadOnlyCollection<EActor> ComponentsInChildren { get; }Property Value
Methods
AddComponent(Type, string)
Adds a component to the IEntity.
EActor AddComponent(Type type, string name = "")Parameters
Returns
AddComponent<T>(string)
Adds a component to the IEntity.
T AddComponent<T>(string name = "") where T : EActorParameters
- namestring
- The name of the component. 
Returns
- T
- The added EActor component. 
Type Parameters
- T
- The - TEActor to be added.
AddComponent<T>(Type, string)
Adds a component from the IEntity.
T AddComponent<T>(Type type, string name = "") where T : EActorParameters
Returns
- T
- The added EActor component. 
Type Parameters
- T
- The - Tcast EActor type.
GetComponent(Type)
Gets a component from the IEntity.
EActor GetComponent(Type type)Parameters
Returns
GetComponent<T>()
Gets a component from the IEntity.
T GetComponent<T>() where T : EActorReturns
- T
- The EActor component. 
Type Parameters
- T
- The - TEActor to look for.
GetComponent<T>(Type)
Gets a component from the IEntity.
T GetComponent<T>(Type type) where T : EActorParameters
Returns
- T
- The EActor component. 
Type Parameters
- T
- The cast - TEActor.
HasComponent(Type, bool)
Checks if the IEntity has an active component.
bool HasComponent(Type type, bool depthInheritance = false)Parameters
- typeType
- The EActor to look for. 
- depthInheritancebool
- A value indicating whether subclasses should be considered. 
Returns
HasComponent<T>(bool)
Checks if the IEntity has an active component.
bool HasComponent<T>(bool depthInheritance = false)Parameters
- depthInheritancebool
- A value indicating whether subclasses should be considered. 
Returns
Type Parameters
- T
- The EActor to look for. 
TryGetComponent(Type, out EActor)
Tries to get a component from the IEntity.
bool TryGetComponent(Type type, out EActor component)Parameters
Returns
TryGetComponent<T>(Type, out T)
Tries to get a component from the IEntity.
bool TryGetComponent<T>(Type type, out T component) where T : EActorParameters
Returns
Type Parameters
- T
- The cast - TEActor.
TryGetComponent<T>(out T)
Tries to get a component from the IEntity.
bool TryGetComponent<T>(out T component) where T : EActorParameters
- componentT
- The - TEActor.
Returns
Type Parameters
- T
- The - TEActor to look for.