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

Re: [pygame] Re: sprite.spritecollide



If '[<Tableau sprite(in 1 groups)>]' is the result of printing colliding_with, I'm pretty sure that is a list of only one instance of a Sprite. If it were the Sprite class itself if would be represented by '<class 'pygame.sprite.Sprite>' or something like that, and would not contain the number of groups the sprite is in.

That is also what the doc says:
"Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the Sprite.rect attribute of each Sprite. "

If it really is returning just the class, then it's a bug in pygame.

On Sat, Aug 15, 2009 at 03:45, Maxwell Wise <maxdwise@xxxxxxxxx> wrote:
The sprites all have unique names... but spritecollide only returns
the class of the object, not the name or any other identifier to
distinguish between objects of the same class...