Show / Hide Table of Contents

    Interface IEntity

    The definition of a controller (this) to a model (IEntityData). Each entity in IdleKit has a IEntity, IEntityData, IGuidReferenceableAsset, and an optional ISavedData.

    Namespace: IdleKit.Framework
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IEntity : IInjectable

    Properties

    instanceId

    This is a cached copy of the instanceId that was used to load this controller.

    This is often used as the ISavedData id to prevent two controllers from altering the same ISavedData, if they were to be created from the same IEntityData object.

    This can also be used when fetching IEntitys from the IResolver. Using the same id and instanceId when loading an IEntity will result in the same cached object (and therefore, ISavedData reference).

    Using a different instanceId when loading from the same id will result in two controllers and ISavedDatas.

    Declaration
    string instanceId { get; }
    Property Value
    Type Description
    String

    staticDataId

    The id of the IEntityData that was used to CreateEntity(String) this IEntity.

    Declaration
    string staticDataId { get; }
    Property Value
    Type Description
    String

    Methods

    Cleanup(IEntityLoaderService)

    Responsible for performing cleanup on the child IEntitys and other objects owned by this IEntity. It is important to perform Cleanup(IEntityLoaderService) to make sure there is no memory leak.

    Declaration
    void Cleanup(IEntityLoaderService entityLoaderService)
    Parameters
    Type Name Description
    IEntityLoaderService entityLoaderService

    Initialize()

    Responsible for performing the setup logic including subscription to the IActions for this IEntity. It is called right after Inject(IResolver) when this IEntity is loaded in the IEntityLoaderService.

    Declaration
    void Initialize()
    Back to top Copyright © 2020 East Side Games Inc.