From f5eaa22a1c9598c9f7a55a41614d1ce4769dee4a Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Tue, 1 Mar 2022 02:48:49 +0530 Subject: * Adds Ambience SFX & Management * Notification - In-Progress * Collision Callbacks * Interactive & Pickable entities - In-Progress --- core/ambience.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 core/ambience.lua (limited to 'core/ambience.lua') diff --git a/core/ambience.lua b/core/ambience.lua new file mode 100644 index 0000000..13919d9 --- /dev/null +++ b/core/ambience.lua @@ -0,0 +1,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 \ No newline at end of file -- cgit v1.2.3