-
Notifications
You must be signed in to change notification settings - Fork 0
/
assets.lua
41 lines (41 loc) · 1006 Bytes
/
assets.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
local graphics
graphics = love.graphics
local Assets
do
local _class_0
local _base_0 = { }
_base_0.__index = _base_0
_class_0 = setmetatable({
__init = function(self)
self.tex = setmetatable({ }, {
__index = function(tex, name)
if not Assets.images[name] then
Assets.images[name] = graphics.newImage("images/" .. tostring(name) .. ".png")
end
return Assets.images[name]
end
})
self.font = {
basic = graphics.newFont('fonts/Anonymous Pro Minus.ttf', 28),
splash = graphics.newFont('fonts/Anonymous Pro Minus.ttf', 66)
}
self.sound = { }
end,
__base = _base_0,
__name = "Assets"
}, {
__index = _base_0,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
return _self_0
end
})
_base_0.__class = _class_0
local self = _class_0
self.images = { }
Assets = _class_0
end
return {
Assets = Assets
}