Interface AudioSourceComponentDefinitionExtended

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 | PBAudioSource

  • 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

  • Set playing=true the sound $name

    Returns

    true in successful playing, false if it doesn't find the AudioSource component

    Parameters

    • entity: Entity

      entity with AudioSource component

    • src: string

      the path to the sound to play

    • Optional resetCursor: boolean

      the sound starts at 0 or continues from the current cursor position

    Returns boolean

  • Set playing=false all sounds

    Returns

    true in successful stopping, false if it doesn't find the AudioSource component

    Parameters

    • entity: Entity

      entity with AudioSource component

    • Optional resetCursor: boolean

      the sound stops at 0 or at the current cursor position

    Returns boolean