-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlocks.lua
More file actions
28 lines (22 loc) · 809 Bytes
/
Blocks.lua
File metadata and controls
28 lines (22 loc) · 809 Bytes
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
local Blocks = {}
Blocks.__index = Blocks
function Blocks:new()
local blocks = {
X = love.graphics.newImage("imagens/muro.png"),
Y = love.graphics.newImage("imagens/piso.png"),
A = love.graphics.newImage("imagens/feno.png"),
C = love.graphics.newImage("imagens/buraco.png"),
B = love.graphics.newImage("imagens/baufechado.png"),
M = love.graphics.newImage("imagens/monstro2.png"),
BA = love.graphics.newImage("imagens/bauAberto.png"),
K = love.graphics.newImage("imagens/chaveMapa.png"),
P = love.graphics.newImage("imagens/portal.png"),
E = love.graphics.newImage("imagens/entrada.png"),
}
setmetatable(blocks, Blocks)
return blocks
end
function Blocks:get(attr)
return blocks[attr]
end
return Blocks