Search Results for

    Show / Hide Table of Contents

    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 Source

    ComponentsInChildren

    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 Source

    AddComponent(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.

    | Improve this Doc View Source

    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 T EActor to be added.

    | Improve this Doc View Source

    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 T cast EActor type.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 T EActor to look for.

    | Improve this Doc View Source

    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 T EActor.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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 T EActor.

    Returns
    Type Description
    System.Boolean

    true if the component was found; otherwise, false.

    Type Parameters
    Name Description
    T

    The T EActor to look for.

    | Improve this Doc View Source

    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 T EActor.

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX