aboutsummaryrefslogtreecommitdiff
path: root/core/ambience.lua
blob: 13919d92dea530dae3b07c1c41fbe76c42878cc7 (plain)
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