Options
All
  • Public
  • Public/Protected
  • All
Menu

Plays a random sound from an array of sounds.

Example

const ding = new SoundGroup([
new Sound('assets/sounds/ding1.ogg'),
new Sound('assets/sounds/ding2.ogg'),
new Sound('assets/sounds/ding3.ogg'),
new Sound('assets/sounds/ding4.ogg')
])

// When one of the sounds should play.
ding.play()

Hierarchy

  • SoundGroup

Index

Constructors

Methods

Constructors

constructor

Methods

play

stop

  • stop(): void