mike: Now resepcts delta time (dt)

This commit is contained in:
2017-07-25 18:41:25 -07:00
parent beb04e1451
commit 091e055841
3 changed files with 10 additions and 10 deletions

View File

@@ -10,9 +10,9 @@ function love.load()
screen.height = love.graphics.getHeight()
-- Create a table to hold all the player data
player = create_object(screen.width /2, screen.height - 50, 30, 5, 10)
player = create_object(screen.width /2, screen.height - 50, 30, 5, 500)
-- Create a table to hold ball data
ball = create_object(screen.width /2, screen.height /2, 1, 1, 10)
ball = create_object(screen.width /2, screen.height /2, 1, 1, 600)
ball.x_speed = (ball.speed /2)
ball.y_speed = (ball.speed /2)
@@ -20,8 +20,8 @@ function love.load()
end
function love.update(dt)
player = check_keys(player, screen)
ball = ball_bounce(player, ball)
player = check_keys(player, screen, dt)
ball = ball_bounce(player, ball, dt)
end
function love.draw()