直接放入Zframework文件

This commit is contained in:
MrZ_26
2023-12-04 20:02:12 +08:00
parent 8ee7a90eca
commit f38746ff96
36 changed files with 13120 additions and 0 deletions

25
Zframework/image.lua Normal file
View File

@@ -0,0 +1,25 @@
local IMG={}
function IMG.init(list)
IMG.init=nil
setmetatable(IMG,{__index=function(self,name)
if type(list[name])=='table' then
self[name]={}
for k,v in next,list[name] do
self[name][k]=love.graphics.newImage(v)
end
elseif type(list[name])=='string' then
self[name]=love.graphics.newImage(list[name])
else
LOG("No IMG: "..name)
self[name]=PAPER
end
return self[name]
end})
function IMG.loadAll()
for k in next,list do local _=IMG[k] end
IMG.loadAll=nil
end
end
return IMG