Class: SongsManager

SongsManager

The manager for songs

new SongsManager ()

Properties:
Name Type Description
musicEffectStep number The music effect step
isProgressionMusicEnd boolean Indicate if the progression music is end
isMusicNone boolean Indicate if music is none
volumes Array.<number> Current volumes according to song kind
starts Array.<number> Current starts time according to song kind
ends number The current ends time according to song kind
currentSong Array.<Howl> The howl current song
progressionMusic SystemProgressionTable The system progression music
progressionMusicEnd number The progression music end

Methods

playMusic (kind, id, volume, start, end)

Play a music
Name Type Description
kind SongKind The kind of the song
id number The id of the song
volume number The volume of the song
start number The start of the song
end number The end of the song

stopSong (kind, time, seconds, pause)boolean

Stop a song
Name Type Description
kind SongKind The kind of song to stop
time number The date seconds value in the first call of stop
seconds number The seconds needed for entirely stop the song
pause boolean Indicates if the song needs to be paused instead of stoppped
Returns:
Type Description
boolean Indicates if the song is stopped

unpauseSong (kind, time, seconds)boolean

Unpause a song
Name Type Description
kind SongKind The kind of song to unpause
time number The date seconds value in the first call of unpause
seconds number The seconds needed for entirely play the song
Returns:
Type Description
boolean Indicate if the song is played with all volume

playSound (id, volume)

Play a sound
Name Type Description
id number The id of the sound
volume number The volume of the sound

playMusicEffect (id, volume, currentState)

Play a music effect
Name Type Description
id number The id of the sound
volume number The volume of the sound
currentState Object The current state command

updateByKind (kind)

Update songs positions or other stuff
Name Type Description
kind SongKind The song kind

update ()

Update songs positions or other stuffs

stopMusic (time)

Stop the music (with progression)
Name Type Description
time number The time to stop

initializeProgressionMusic (i, f, equation, end)

Initialize progression music (for stop)
Name Type Description
i number The initial volume
f number The final volume
equation number The equation kind
end number The end of the song

updateProgressionMusic ()

Update the progression music

stopAll ()

Stop all the songs