[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] Subclassing Sprite
This is probably due to me not really understanding something
in python, but I think I should ask here anyhow.
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 think what I want is a special kind of Sprite
which can be used with any kind of group, not one that requires
a special kind of group to use.
My thought was to make each part actually be a Sprite, then
override add, add_internal, remove, remove_internal
such that when I add or remove this "sprite" from a group,
it actually adds and removes all of its parts.
The thing is, I am having some trouble with this __g variable.
Should I go ahead and access it as _Sprite__g or am I missing
something vital here? It seems like someone went to a bit of
trouble to keep me from doing that ;o)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org