[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] get all sprites?



Hi,

is it possible to get a list of all living sprites? Does pygame keep a
reference of this?

I have a 'Person' object, a subclass of Sprite, which should 'fall' (go
down) if no 'Wall' object (also a subclass of Sprite) is immediatly below.
I do have a group of all wall objects, but in a different module. Is it
necessary to give the 'falling' method of the Person instance (which checks
whether to fall or not) a Group instance containing all walls, or is there a
function which returns a Group instance containing *all* sprites (which I can
loop over to check for walls)?

I have been unable to find an answer in either the documentation, the
archives or the source code, so I presume the answer is no?

yours,
Gerrit.

-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Het zijn tijden om je zelf met politiek te bemoeien:
	http://www.sp.nl/
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org