Code: Select all
q=love g=q.graphics m=math function q.load()l={};t=0 end function q.update(d)t=t+d end function q.draw()for i=1,75 do x=m.sin(t+i)*64 c=128-64*(m.sin(t+i)-m.sin(t+i+1))g.setColor(c,c,c,128)g.circle('fill',x+400,i*8,8,8)g.setColor(c,c,c,128)g.circle('fill',x+398,i*8-2,4,8)l[i*2-1]=x+400 l[i*2]=i*8 end g.line(l)end
Code: Select all
for i = 1,screen.h/8 do
local x = math.sin(game.timer + i) * 64
local color = 128 - 64*(math.sin(game.timer + i) - math.sin(game.timer + i + 1))
love.graphics.setColor(color, color, color, 128)
love.graphics.circle('fill', x + screen.w/2, i*8, 8, 8)
love.graphics.setColor(color, color, color, 128)
love.graphics.circle('fill', x + screen.w/2 - 2, i*8 - 2, 4, 8)
tmp[i*2-1] = x + screen.w/2
tmp[i*2] = i*8
end
love.graphics.setColor(128, 128, 192)
love.graphics.line(tmp)
love.graphics.setColor(255, 255, 255)