mike: Now resepcts delta time (dt)
This commit is contained in:
@@ -61,10 +61,10 @@ end
|
||||
|
||||
|
||||
|
||||
function ball_bounce(player, ball)
|
||||
function ball_bounce(player, ball, dt)
|
||||
local paddle_hit = false
|
||||
ball.x = ball.x + ball.x_speed
|
||||
ball.y = ball.y + ball.y_speed
|
||||
ball.x = ball.x + (ball.x_speed *dt)
|
||||
ball.y = ball.y + (ball.y_speed *dt)
|
||||
|
||||
--If ball hits screen wall
|
||||
if ball.x >= screen.width or ball.x < 0 then
|
||||
|
||||
Reference in New Issue
Block a user