Interface TriggerAreaComponentDefinitionExtended

Hierarchy

Properties

componentId: number
componentName: string
componentType: LastWriteWinElementSet

Methods

  • Delete the current component to an entity, return null if the entity doesn't have the current component.

    • Internal comment: This method adds the <entity,component> to the list to be reviewed next frame

    Parameters

    • entity: Entity

      Entity to delete the component from

    Returns null | PBTriggerArea

  • Marks the entity as deleted and signals it cannot be used ever again. It must clear the component internal state, produces a synchronization message to remove the component from the entity.

    Parameters

    • entity: Entity

      Entity ID that was deleted.

    • markAsDirty: boolean

    Returns void

  • Get the CRDT state for an entity (serialized data and timestamp)

    Returns

    Object with serialized data and timestamp, or null if entity doesn't have the component

    Parameters

    • entity: Entity

      Entity to get the CRDT state for

    Returns null | {
        data: Uint8Array;
        timestamp: number;
    }

  • Set a box in the MeshCollider component

    Parameters

    • entity: Entity

      entity to create or replace the TriggerArea component

    • Optional collisionMask: ColliderLayer | ColliderLayer[]

      the collision layers mask for the trigger to react, default: Player

    Returns void

  • Set a sphere in the MeshCollider component

    Parameters

    • entity: Entity

      entity to create or replace the TriggerArea component

    • Optional collisionMask: ColliderLayer | ColliderLayer[]

      the collision layers mask for the trigger to react, default: Player

    Returns void