SerenityJS
    Preparing search index...

    Class EntityEffectsTrait

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entity: Entity

    The entity that this trait is attached to.

    identifier: string = ...

    The identifier of the trait.

    components: string[] = []

    The entity component identifiers that this trait is compatible with by default. If empty, the trait will not be initialized by any component.

    identifier: "effects"

    The identifier of the trait.

    type: EntityIdentifier[] = ...
    types: EntityIdentifier[] = []

    The entity type identifiers that this trait is compatible with by default.

    Accessors

    Methods

    • Checks if the entity has an active effect of the specified type.

      Parameters

      • effectType: EffectType

        The type of the effect to check.

      Returns boolean

      true if the entity has an active effect of the specified type; otherwise, false.