Advertisement
dalvorsn

Untitled

May 16th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.01 KB | None | 0 0
  1. local maxX = 1280
  2. local maxY = 768
  3.  
  4. function drawMap()
  5.    
  6.     local id = 1
  7.     for x = 0, maxX, 32 do
  8.         for y = 0, maxY, 32 do
  9.             objects.ground[id] = {}
  10.             objects.ground[id].body = love.physics.newBody(world, x, y)
  11.             objects.ground[id].shape = love.physics.newRectangleShape(0, 0, 32, 32)
  12.             objects.ground[id].fixture = love.physics.newFixture(objects.ground[id].body, objects.ground[id].shape)
  13.             if(map[x/32 +1] and map[x/32 +1][y/32 +1 ])then
  14.                 love.graphics.draw(love.graphics.newImage("/imagens/tiles/".. map[x/32 +1][y/32 +1 ]..".png"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement