sparkengineweb
    Preparing search index...

    Class BaseEntity

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    uuid: string = ...

    Accessors

    Methods

    • Adds a component to this entity.

      The component type is used as search key for the component. A key is also added for any item in its types chain. If a component of the same type is already present, it will be added to the components list as a new Item. The latest item to be added is the first in the list. The same applies for types in its type chain

      Parameters

      • component: IComponent

        the componnt to add to this entity

      Returns void

    • Gets all the components mathcing a specific type. We highly recommend to not use base types as a search key due to high chances of collisions See .addComponent() method

      Type Parameters

      Parameters

      • type: string

      Returns Component[]

      the first component found with the type