Skip to main content

Class: AudioComponent

Defined in: audio/components/audio-component.ts:7

Component to manage audio in the game.

Implements

Constructors

Constructor

new AudioComponent(options, playSound): AudioComponent

Defined in: audio/components/audio-component.ts:27

Creates an instance of AudioComponent.

Parameters

options

HowlOptions

The HowlOptions to configure the sound.

playSound

boolean = false

A boolean indicating whether to play the sound immediately. Default is false.

Returns

AudioComponent

See

Documentation

Example

const audioComponent = new AudioComponent({
src: ['sound.mp3'],
volume: 0.5,
}, true);

Properties

name

name: symbol

Defined in: audio/components/audio-component.ts:8

The unique name of the component.

Implementation of

Component.name


playSound

playSound: boolean

Defined in: audio/components/audio-component.ts:10


sound

sound: Howl

Defined in: audio/components/audio-component.ts:9


symbol

readonly static symbol: typeof symbol

Defined in: audio/components/audio-component.ts:12