Перейти к основному содержанию

AudioSource

Index

Constructors

constructor

  • new AudioSource(sourceType: SourceType, source: any, soundName: string, volume?: number, radius?: number): AudioSource
  • Parameters

    • sourceType: SourceType
    • source: any
    • soundName: string
    • optionalvolume: number
    • optionalradius: number

    Returns AudioSource

Properties

dimension

dimension: number

isLooping

isLooping: boolean

isPlaying

isPlaying: boolean

nextSound

nextSound: string

position

position: Vector

radius

radius: number

remove

remove: boolean

soundName

soundName: string

source

source: any

sourceType

sourceType: SourceType

startTime

startTime: number

streamID

streamID: number

volume

volume: number

Methods

pause

  • pause(): void
  • Returns void

play

  • play(): void
  • Returns void

playNextSound

  • playNextSound(): void
  • Returns void

resume

  • resume(): void
  • Returns void

setNextSound

  • setNextSound(soundName: string): void
  • Parameters

    • soundName: string

    Returns void

setPosition

  • setPosition(x: number, y: number, z: number): this
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns this

setSound

  • setSound(soundName: string): void
  • Parameters

    • soundName: string

    Returns void

stop

  • stop(): void
  • Returns void

updateVolume

  • updateVolume(): void
  • Returns void