mike: Added stupid stuff

This commit is contained in:
2017-07-25 22:19:56 -07:00
parent 47d1c9192e
commit 80a67f16b9
2 changed files with 24 additions and 5 deletions

View File

@@ -71,11 +71,18 @@ function ball_bounce(player, ball, dt)
ball.x_speed = ball.x_speed * -1
end
--If ball hits screen top/bottom
if ball.y >= screen.height or ball.y <0 then
--If ball hits screen top
if ball.y >= screen.height then
ball.y_speed = ball.y_speed * -1
ball.score = ball.score + 1
end
--If ball hits screen bottom
if ball.y <= 0 then
ball.y_speed = ball.y_speed * -1
end
--If ball hits paddle
if hitbox_collision(ball.x, ball.y, ball.width, ball.height,