mike: Added stupid stuff
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user