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 : EActor
Parameters
name
stringThe name of the component.
Returns
- T
The added EActor component.
Type Parameters
T
The
T
EActor to be added.
AddComponent<T>(Type, string)
Adds a component from the IEntity.
T AddComponent<T>(Type type, string name = "") where T : EActor
Parameters
Returns
- T
The added EActor component.
Type Parameters
T
The
T
cast 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 : EActor
Returns
- T
The EActor component.
Type Parameters
T
The
T
EActor to look for.
GetComponent<T>(Type)
Gets a component from the IEntity.
T GetComponent<T>(Type type) where T : EActor
Parameters
Returns
- T
The EActor component.
Type Parameters
T
The cast
T
EActor.
HasComponent(Type, bool)
Checks if the IEntity has an active component.
bool HasComponent(Type type, bool depthInheritance = false)
Parameters
type
TypeThe EActor to look for.
depthInheritance
boolA 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
depthInheritance
boolA 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 : EActor
Parameters
Returns
Type Parameters
T
The cast
T
EActor.
TryGetComponent<T>(out T)
Tries to get a component from the IEntity.
bool TryGetComponent<T>(out T component) where T : EActor
Parameters
component
TThe
T
EActor.
Returns
Type Parameters
T
The
T
EActor to look for.