Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #New Collision Detection from /u/edbluetooth
- if (0 < int(ball_pos[0]) <=30) and (y1 - 55 < int(ball_pos[1]) <= y1 + 55):
- ball_velocity = (ball_velocity * -1)
- ball_velocity[0] = random.randint(1, 11)
- ball_velocity[1] = random.randint(-10, 11)
- if (755 < int(ball_pos[0]) <=800) and (y2 - 55 < int(ball_pos[1]) <= y2 + 55):
- ball_velocity = (ball_velocity * -1)
- ball_velocity[0] = random.randint(-11, -1)
- ball_velocity[1] = random.randint(-10, 11)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement