Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function love.load()
- --Object = require "classic"
- require "cjrcle"
- windowwidth = 1000
- windowheight = 1000
- sucess = love.window.setMode(windowwidth, windowheight) -- what does this line do? ... will work but the circle is offset
- ctheta = math.pi/2
- x = 0
- y = 0
- gcxco = -500
- gcyco = 0
- startposX = - 500
- cxpos = 100*math.cos(ctheta)
- cypos = 100*math.sin(ctheta)
- discr = 50
- hr = 10
- end
- function love.update(dt)
- ctheta = ctheta - 2*math.pi*dt -- smaller angle = slower rotspeed
- gcxco = gcxco + 1*dt
- --if startposX < 0 then
- -- startposX = startposX + 1
- --end
- -- player will appear in center of screen... why?
- while startposX < 0 do
- if love.keyboard.isDown("space") then
- startposX = startposX
- else
- startposX = startposX + 1
- end
- end
- --end
- --startposX = startposX + 1
- end
- function love.draw()
- --love.graphics.push()
- love.graphics.translate(windowwidth/2, windowheight/2)
- -- green circle
- love.graphics.setColor(0, 1, 0)
- cjrcle(discr, startposX, gcyco, 32)
- --blue circle
- love.graphics.setColor(0, 0, 1) -- blue paint
- cjrcle(10, startposX + discr*math.cos(ctheta), y - discr*math.sin(ctheta), 16)
- --love.graphics.pop()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement