1
我怎样才能找到两个rects碰撞某一方? (例如rect1.rect.top,rect2.rect.bottom)我试过rect1.rect.colliderect(rect2)
和pygame.sprite.collide_rect(rect1, rect2)
,但他们没有找到单个的侧面碰撞。Pygame - Rect相互碰撞
我怎样才能找到两个rects碰撞某一方? (例如rect1.rect.top,rect2.rect.bottom)我试过rect1.rect.colliderect(rect2)
和pygame.sprite.collide_rect(rect1, rect2)
,但他们没有找到单个的侧面碰撞。Pygame - Rect相互碰撞
没关系,我找到了答案。 if rect1.rect.bottom >= rect2.rect.top and rect1.rect.bottom <= rect2.rect.bottom: