Advertisement
Guest User

Untitled

a guest
Oct 7th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def detectCollisions(self,rect1: Rect, rect2: Rect):
  2.         if rect1.bottom >= rect2.top or rect1.top <= rect2.bottom:
  3.             self.vertcol = True
  4.         if rect1.right >= rect2.left or rect1.left <= rect2.right:
  5.             self.sidecol = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement