Class: SoundComponent
Defined in: audio/components/sound-component.ts:7
Component to manage sounds in the game.
Implements
Constructors
Constructor
new SoundComponent(
options
,playSound
):SoundComponent
Defined in: audio/components/sound-component.ts:27
Creates an instance of SoundComponent.
Parameters
options
HowlOptions
The HowlOptions to configure the sound.
playSound
boolean
= false
A boolean indicating whether to play the sound immediately.
Returns
SoundComponent
See
Example
const soundComponent = new SoundComponent({
src: ['sound.mp3'],
volume: 0.5,
}, true);
Properties
name
name:
symbol
Defined in: audio/components/sound-component.ts:8
The unique name of the component.
Implementation of
playSound
playSound:
boolean
Defined in: audio/components/sound-component.ts:10
sound
sound:
Howl
Defined in: audio/components/sound-component.ts:9
symbol
readonly
static
symbol: typeofsymbol
Defined in: audio/components/sound-component.ts:12