SerenityJS
    Preparing search index...

    Class EntityEquipmentTrait

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The armor container that holds the equipment items.

    entity: Entity

    The entity that this trait is attached to.

    identifier: string = ...

    The identifier of the trait.

    The offhand container that holds the equipment items.

    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: "equipment"

    The identifier of the trait.

    types: EntityIdentifier[] = ...

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

    Accessors

    Methods

    • Swaps an item stack from the inventory to an equipment slot.

      Parameters

      • slot: number

        The slot of the item stack in the inventory.

      • equipmentSlot: EquipmentSlot

        The equipment slot to swap the item stack to.

      Returns void