Code: Select all
player = love.graphics.rectangle('fill', x, y, 32, 32)
Code: Select all
player = love.graphics.rectangle('fill', x, y, 32, 32)
Code: Select all
local rects = {}
function love.load()
table.insert(rects, {x=100,y=100,w=200,h=50})
for i=1,10 do -- let's add 10 random rectangles
table.insert(rects, {x=math.random(0,600),y=math.random(0,480),w=32,h=32})
end
end
function love.draw()
for index, rect in ipairs(rects) do
love.graphics.rectangle('fill',rect.x,rect.y,rect.w,rect.h)
end
end
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests