--- @class Audio --- @field musicVolume number --- @field soundVolume number audio = {} audio.__index = audio local function new(musicVolume, soundVolume) -- здесь мы должны выгружать значения из файлика с сохранением настроек return setmetatable({ musicVolume = musicVolume, soundVolume = soundVolume }, audio) end --- @param source love.Source function audio:play(source) if source:getType() == "static" then source:setVolume(self.musicVolume) return source:play() end source:setVolume(self.soundVolume) return source:play() end function audio:setMusicVolume(volume) self.musicVolume = volume end function audio:setSoundVolume(volume) self.soundVolume = volume end return { new = new }