sparkengineweb
    Preparing search index...

    Class TriggerEntity

    Use this Entity to detect collisions with another target entity and implement a custom logic

    This entity does not support target serialization, please follow https://github.com/RuggeroVisintin/SparkEngineWeb/issues/366

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    onTriggerCB: null | Function = null

    The callback to trigger when a collision with the target entity is detected.

    uuid: string = ...

    Accessors

    • get name(): string

      Returns string

    • set name(value: string): void

      The name of the entity. Must be unique in the same scene

      Parameters

      • value: string

      Returns void

    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