[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Remove a sprite



Hello,                    

I'm trying to remove a sprite but it doesn't work... The sprite is not removed.

Here a sample of my code :

for sprite in wb_group_sprites.sprites():
      if (sprite.rect.centerx == posx and sprite.rect.centery == posy):
          wb_group_sprites.remove(sprite)

Thanks in advance

teo