Code: Select all
for i = 1, 4 do img[i] = love.graphics.newImage('1' .. '/' .. i .. '.png') end
Code: Select all
for i = 1, 4 do img[i] = love.graphics.newImage('1' .. '/' .. i .. '.png') end
Code: Select all
x = x + vx * dt
Code: Select all
if vx ~= 0 then x = x + vx * dt end
Code: Select all
v.x, v.y = v.x + v.vx * dt, v.y + v.vy * dt
Code: Select all
local p = {}
for i = 1, 2 do p[i] = {x = (2 * i - 1) * w / 4, y = h / 2, w = 100, h = 100, xx = x, yy= y} end
Code: Select all
local x = love.math.random(1, 4)
local y = love.math.random(1, 4) -- y ~= x
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