diff options
author | Aki <nthirtyone@gmail.com> | 2017-07-16 20:20:50 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-07-16 20:20:50 +0200 |
commit | b2c2ef1ae1300a2a2610525bf19db227d6d5e54b (patch) | |
tree | e8d66f64c8c4cf08c4e23fe311da05503dcaec27 /not/MusicPlayer.lua | |
parent | e39c00b6e26504ba0f5fc4f0129bfceb3afe331f (diff) | |
download | roflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.zip roflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.tar.gz roflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.tar.bz2 |
Music doesn't stop on transition from any-menu to main-menu
Diffstat (limited to 'not/MusicPlayer.lua')
-rw-r--r-- | not/MusicPlayer.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/not/MusicPlayer.lua b/not/MusicPlayer.lua index e838d96..4634ed9 100644 --- a/not/MusicPlayer.lua +++ b/not/MusicPlayer.lua @@ -32,6 +32,14 @@ function MusicPlayer:setTrack (trackName) end end +function MusicPlayer:getCurrentTrack () + for key,track in pairs(self.tracks) do + if self.tracks[key] == self.source then + return key + end + end +end + function MusicPlayer:play () self.source:play() end |