Code: Select all
function maker()
AllImgFiles = love.filesystem.getDirectoryItems(dir)
local n = 1
while n <= (#AllImgFiles) do
table.insert(newdir, dir .. AllImgFiles[n])
table.insert(img, love.graphics.newImage(newdir[n]))
table.insert(imgWidth, img[n]:getWidth() +10)
n = n + 1
end
end
Code: Select all
_G.times = 1
function images(s, x, y )
for i = 1, (#AllImgFiles), 1 do
love.graphics.draw(img[times],x, y, 0, s, s, tiw[times])
times = times + 1
end
end
function autoimg(s, x, y )
if times < (#AllImgFiles) then
images(s, x, y)
end
end