I'm using the following:
hit = pygame.sprite.spritecollide(player, door_list, False)
Is there any way of checking with what element in door_list
the player collided with?
I'm using the following:
hit = pygame.sprite.spritecollide(player, door_list, False)
Is there any way of checking with what element in door_list
the player collided with?
pygame.sprite.spritecollide
returns a list containing all Sprites in a _Group: that intersect with another Sprite:
hit_doors = pygame.sprite.spritecollide(player, door_list, False)
for door in hit_doors:
# do something
# [...]