Agora ele olha pra frente deitado
[Projeto-PCG.git] / maploader.lua
blobf69fcfb202d109cc424843ed26c05ac03944b926
1 function map(t)
2 regmap(t.width,t.height,t.spawn[1],t.spawn[2])
3 for i,p in pairs(t.platforms) do
4 regplatform(p[1],p[2],p[3],p[4],p.passable,p.color[1],p.color[2],p.color[3])
5 end
6 for i,w in pairs(t.weapons) do
7 regweapon(w.name, w.spawn[1], w.spawn[2])
8 end
9 for i,e in pairs(t.enemies) do
10 regenemy(e.name, e.spawn[1], e.spawn[2])
11 end
12 return t
13 end
15 function platform(t)
16 if t.passable == nil then
17 t.passable = true
18 end
19 if t.color == nil then
20 if t.passable then
21 t.color = {0.5,0.5,0.5}
22 else
23 t.color = {0,0,0}
24 end
25 end
26 return t
27 end