diff options
author | Aki <nthirtyone@gmail.com> | 2017-04-09 22:07:04 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-04-09 22:07:04 +0200 |
commit | 0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (patch) | |
tree | 8d270eb07f589d2487b3ce66d4865e5a4718042a /music.lua | |
parent | 55b0cf1a22e4a7e41fe00aa693445d6c4bd0652d (diff) | |
parent | a03c1125f10fbbad253a0efc4727072fcbd55345 (diff) | |
download | roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.zip roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.gz roflnauts-0dd01913fe0eefc7ba4bc0797877f40fdedf9315.tar.bz2 |
Merge branch 'com'
Diffstat (limited to 'music.lua')
-rw-r--r-- | music.lua | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/music.lua b/music.lua deleted file mode 100644 index 1ac26bb..0000000 --- a/music.lua +++ /dev/null @@ -1,27 +0,0 @@ --- `Music` --- Simple music player object that plays and loops selected track in single Scene. - --- WHOLE CODE HAS FLAG OF "need a cleanup" - --- Metatable of `Music` --- nils initialized in constructor -Music = { - track = nil, - source = nil -} -function Music:new(track) - -- Meta - local o = {} - setmetatable(o, self) - self.__index = self - -- Init - o.track = track - o.source = love.audio.newSource("assets/music/" .. o.track) - o.source:setLooping(true) - o.source:setVolume(.7) - o.source:play() - return o -end -function Music:delete() - self.source:stop() -end
\ No newline at end of file |