@game-vir/entity - v15.1.1
    Preparing search index...

    Type Alias StaticEntity<EntityKey, Shape>

    Static members of both view and logic entity constructors.

    type StaticEntity<
        EntityKey,
        Shape extends ShapeDefinition<AnyObject, any> | undefined,
    > = {
        entityKey: EntityKey;
        paramsMap: ParamsMap<
            Shape extends ShapeDefinition<AnyObject, any>
                ? Shape["runtimeType"]
                : undefined,
        >;
        paramsShape: Shape;
        deserialize(serialized: undefined | string): undefined | AnyObject;
    }

    Type Parameters

    • EntityKey
    • Shape extends ShapeDefinition<AnyObject, any> | undefined
    Index

    Properties

    entityKey: EntityKey

    This key is used for deserialization of entities to track which class needs to be constructed. You cannot have duplicate keys loaded at the same time.

    paramsMap: ParamsMap<
        Shape extends ShapeDefinition<AnyObject, any>
            ? Shape["runtimeType"]
            : undefined,
    >

    Defines which properties from BaseEntity.params will be mapped to hitbox and/or view properties.

    paramsShape: Shape

    Shape definition of this entity's parameters.

    Methods