📅  最后修改于: 2022-03-11 14:45:27.193000             🧑  作者: Mango
#For detecting collisions in pygame
Rect1 = pg.Rect(x, y, width, height)
Rect2 = pg.Rect(x, y, width, height)
if Rect1.colliderect(Rect2):
#Do something