Allows multiple instances of anything that uses Playable to be loaded up and played at the same time.

Property Summary

Public Properties
public

Acts as a register for different types of sounds. Anything that uses Playable can be added to this register. If not set on instantiation, set to A() via _initSounds.

Method Summary

Public Methods
public
play( )

Maps through objects in sounds and calls play on each

public
playAt(time)

Maps through objects in sounds and calls playAt on each, passing through the time param to each sound.

public
playFor(seconds)

Maps through objects in sounds and calls playFor on each, passing through the seconds param to each sound.

public
playForIn(playIn, stopAfter)

Maps through objects in sounds and calls playInAndStopAfter on each, passing through the playIn and stopAfter params to each sound.

public
playIn(seconds)

Maps through objects in sounds and calls playIn on each, passing through the seconds param to each sound.

Private Methods
private

If sounds is null on instantiation, sets it to A()

Public Properties

Acts as a register for different types of sounds. Anything that uses Playable can be added to this register. If not set on instantiation, set to A() via _initSounds.

Public Methods

Maps through objects in sounds and calls play on each

addon/classes/layered-sound.js:47

public playAt(time)

Maps through objects in sounds and calls playAt on each, passing through the time param to each sound.

Parameters:

Name Type Attribute Description
time Number

The time to pass to each object's playAt method.

addon/classes/layered-sound.js:73

public playFor(seconds)

Maps through objects in sounds and calls playFor on each, passing through the seconds param to each sound.

Parameters:

Name Type Attribute Description
seconds Number

The seconds to pass to each object's playFor method.

addon/classes/layered-sound.js:86

public playForIn(playIn, stopAfter)

Maps through objects in sounds and calls playInAndStopAfter on each, passing through the playIn and stopAfter params to each sound.

Parameters:

Name Type Attribute Description
playIn Number

Seconds to pass to each object's playInAndStopAfter method.

stopAfter Number

Seconds to pass to each object's playInAndStopAfter method.

addon/classes/layered-sound.js:60

public playIn(seconds)

Maps through objects in sounds and calls playIn on each, passing through the seconds param to each sound.

Parameters:

Name Type Attribute Description
seconds Number

The seconds to pass to each object's playIn method.

Private Methods

addon/classes/layered-sound.js:103

private _initSounds( )

If sounds is null on instantiation, sets it to A()