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

Re: [pygame] Subclassing Sprite



>I want to create a Sprite subclass which has 2 (or more) separate
>drawing areas, kind of like here:
>
>http://archives.seul.org/pygame/users/Mar-2002/msg00001.html
>

>The thing is, I am having some trouble with this __g variable.
>


Hmm... I can't even remember now why I wanted to access __g
(heh heh?)  I am still not sure if or how I would do that if I
wanted to override add_internal in a Sprite / Group subclass.

Anyhow, what I ended up doing is creating a class which subclasses
both Sprite and Group, and it does mostly what I wanted.

It can't be used in a list of Sprites to initialize a Group, as
Group.add() does not check for _spritegroup once it has figured
out it is working with a sequence. Does anyone else ever need to
create a Group by passing in a sequence of Groups?


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org