1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Class = require("libs.hump.class") Ambience = Class { init = function(self, ambienceTypes) if ambienceTypes then for i,ambience in pairs(ambienceTypes) do local ambientSound = love.audio.newSource("assets/sfx/"..ambience..".ogg", "static") ambientSound:setLooping(true) ambientSound:play() end end end } return Ambience