bdd-creature/classes/folderloader.lua

25 lines
492 B
Lua
Raw Normal View History

local FolderLoader = Object:extend()
function FolderLoader.getAllDatas(value)
local folderLoader = FolderLoader(value)
return folderLoader:getDatas()
end
function FolderLoader:new(value)
self.folder = "data/" .. value.folder
self.data = {}
self.data.nom = value.nom
self.data.list = {}
for _, filename in ipairs(utils.scandir(self.folder)) do
print(filename)
end
end
function FolderLoader:getDatas()
return self.data
end
return FolderLoader