SerenityJS
    Preparing search index...

    Class EntityGravityTrait

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entity: Entity

    The entity that this trait is attached to.

    fallingDistance: number = 0

    The current distance the entity is falling from.

    fallingTicks: number = 0

    The current amount of ticks the entity has been falling for.

    force: number = EntityGravityTrait.defaultForce

    The gravity force value of the entity.

    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.

    defaultForce: number = -0.08
    identifier: "gravity"

    The identifier of the trait.

    types: EntityIdentifier[] = ...

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

    Accessors

    Methods