Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imagen = {w = 15,h=15}
- imagen[1] = image.load(".png")
- imagen[2] = image.load(".png")
- mapa = {x = 0,actual = 1}
- mapa[1] = {
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","2","2","2","2","2","2","2","2","2","2","1"},
- {"1","1","1","1","1","1","1","1","1","1","1","1"}
- }
- mapa.y = -(#mapa[actual]*imagen.h)
- function mapa.blit()
- for y = 1, #mapa[actual] do
- for x = 1, #mapa[actual][y] do
- imagen[tonumber(mapa[actual][y][x])]:blit(mapa.x + (x-1)*imagen.w, mapa.y + (y-1)*imagen.h)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement