SerenityJS
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    components: string[]

    The default components of the entity type.

    identifier: EntityIdentifier

    The identifier of the entity type.

    network: number = ++EntityType.network

    The network id of the entity type.

    properties: Map<string, EntityProperty<EntityPropertyData>> = ...
    traits: Map<string, typeof EntityTrait> = ...

    The traits that are bound to the entity type. These traits are used to define custom behavior for the entity type.

    network: number = 0

    The network identifier counter for entity types.

    types: Map<string, EntityType> = ...

    A collective registry of all entity types.

    Methods

    • Create a new enum property for the entity type.

      Parameters

      • identifier: string

        The identifier of the property.

      • values: string[]

        The possible values of the property.

      • OptionaldefaultValue: string

        The default value of the property, if not specified, the first value will be used.

      Returns EntityEnumProperty

      The created enum property.

    • Create a new float property for the entity type.

      Parameters

      • identifier: string

        The identifier of the property.

      • range: [number, number]

        The value range of the property. (min to max)

      • OptionaldefaultValue: number

        The default value of the property, if not specified, minimum value will be used.

      Returns EntityFloatProperty

      The created float property.

    • Create a new integer property for the entity type.

      Parameters

      • identifier: string

        The identifier of the property.

      • range: [number, number]

        The value range of the property. (min to max)

      • OptionaldefaultValue: number

        The default value of the property, if not specified, minimum value will be used.

      Returns EntityIntProperty

      The created integer property.