-
Notifications
You must be signed in to change notification settings - Fork 0
Lua API: 8. Music
MCUmbrella edited this page Dec 4, 2023
·
1 revision
Music can be automatically looped and cannot be converted to or from Sound. This class is like the combination of the Sound class and PlayingSound class.
NOTE: Only one music can be played at the same time.
Pause the playing music.
Resume the paused music.
Stop the music.
Get or set the volume of the music.
Parameter:
- Number vol (optional): The volume of the music, integer from 0 ~ 128.
Return: The new volume, or the current volume if the parameter "vol" is not present.
Get the friendly name of the music.
Get the path to the file used by the music.
Play the music from start and loop forever.
NOTE: This function doesn't return anything.
Check if the music is in use.
Return: true if so, false otherwise.
Assign another file to the music.
Parameter:
- String newPath: The path to the new file.