Skip to content

Commit

Permalink
rename 'crashed' to 'collided_sprites'
Browse files Browse the repository at this point in the history
  • Loading branch information
MyreMylar authored Dec 31, 2024
1 parent 8a8b7af commit acfa073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src_py/sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,20 +1685,20 @@ def spritecollide(sprite, group, dokill, collided=None):
"""
if collided is not None:
crashed = [
collided_sprites = [
group_sprite for group_sprite in group if collided(sprite, group_sprite)
]
else:
sprite_rect_collide = sprite.rect.colliderect
crashed = [
collided_sprites = [
group_sprite
for group_sprite in group
if sprite_rect_collide(group_sprite.rect)
]
if dokill:
for group_sprite in crashed:
group_sprite.kill()
return crashed
return collided_sprites


def groupcollide(groupa, groupb, dokilla, dokillb, collided=None):
Expand Down

0 comments on commit acfa073

Please sign in to comment.