super-ecs
    Preparing search index...

    Class Entity

    The entity is the container of components.

    Index

    Constructors

    Properties

    id: number

    unique id of entity

    Accessors

    • get componentAdded$(): Observable<Component>

      Stream triggered when a component is added Note: make sure to unsubscribe. If needed, use DisposeBag util

      Returns Observable<Component>

    • get componentRemoved$(): Observable<Component>

      Stream triggered when a component is removed Note: make sure to unsubscribe. If needed, use DisposeBag util

      Returns Observable<Component>

    Methods

    • Get a component of this entity by name.

      Type Parameters

      Parameters

      • componentName: symbol

      Returns T | undefined

    • Check if this entity has a component by name.

      Parameters

      • componentName: symbol

      Returns boolean

    • Remove a component from this entity by name.

      Parameters

      • componentName: symbol

      Returns Entity