Music
The Scar::Music
module manages music playback. It uses a stack structure, that way you may push a new music, then pop it off again and resume the old music where it was stopped. It works together with Assets.
# Play an indexed music asset
Music.play "music1"
Music.current? # Returns currently playing music if any
# Music.current also exists
Music.play "music2"
Music.play "music3"
Music.pop # Stop current music and remove it from the stack
Music.pop_continue # Same as above, but continue with the music now on top of the stack
Last updated
Was this helpful?