You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
777 B
Lua
21 lines
777 B
Lua
function love.update(dt)
|
|
world:update(dt) --this puts the world into motion
|
|
if love.keyboard.isDown("right") then
|
|
objeto.bola.body:applyForce(400, 0)
|
|
elseif love.keyboard.isDown("left") then
|
|
objeto.bola.body:applyForce(-400, 0)
|
|
elseif love.keyboard.isDown("r") then
|
|
objeto.bola.body:setPosition(screen.wc, screen.hc)
|
|
objeto.bola.body:setLinearVelocity(0, 0)
|
|
puntuacion = 0
|
|
puntuacion_max = puntuacion
|
|
elseif
|
|
love.keyboard.isDown("down") then
|
|
objeto.bola.body:applyForce(0,400)
|
|
elseif
|
|
love.keyboard.isDown("up") then
|
|
objeto.bola.body:applyForce(0,-400)
|
|
end
|
|
end
|
|
|