Show / Hide Table of Contents

    Interface IComponent

    A component can be added to an entity (object/character/button/etc), and add additional behavior to it.

    Inherited Members
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IComponent : IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    Entity

    The entity which holds this component.

    Declaration
    IEntity Entity { get; }
    Property Value
    Type Description
    IEntity
    | Improve this Doc View Source

    Name

    The name of the component.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    RegistrationType

    The type under which the component was registered with the entity.

    Declaration
    Type RegistrationType { get; }
    Property Value
    Type Description
    System.Type

    Methods

    | Improve this Doc View Source

    AfterInit()

    This called after all the components have been initialized. If the component requires data from another component AFTER it has been initialized, this is the place to do it.

    Declaration
    void AfterInit()
    | Improve this Doc View Source

    Init(IEntity, Type)

    Initializes the component. If the component is dependant on other components, they should be retrieved here using entity.GetComponent.

    Declaration
    void Init(IEntity entity, Type registrationType)
    Parameters
    Type Name Description
    IEntity entity

    The entity which holds this component.

    System.Type registrationType

    The type under which the component was registered with the entity.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX