Code: Select all
for i, v in ipairs(projectiles) do love.graphics.rectangle('fill', v.x, v.y, v.w, v.h, v.angle) end
Code: Select all
for i, v in ipairs(projectiles) do love.graphics.rectangle('fill', v.x, v.y, v.w, v.h, v.angle) end
Code: Select all
for i, v in ipairs(projectiles) do
love.graphics.push()
love.graphics.translate(v.x + v.w/2, v.y + v.h/2)
love.graphics.rotate(v.angle)
love.graphics.translate(-v.w/2, -v.h/2)
love.graphics.rectangle("fill", 0, 0, v.w, v.h)
love.graphics.pop()
end
Code: Select all
local rotation = math.rad(30)
local rect1x1 = love.graphics.newImage(love.image.newImageData(1, 1, "rgba8", "\255\255\255\255"))
function love.draw()
love.graphics.draw(rect1x1, 400, 300, rotation, 150, 100)
end
Users browsing this forum: Google [Bot] and 1 guest