[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] pygame.sprite.RenderUpdates() without arguments
On Wed, Dec 17, 2008 at 06:06:42PM +0100, Gonzalo Castro wrote:
> > This creates a RenderUpdates group named .all
> >
> >> Player.containers = self.all
> >> Computer.containers = self.all
> >> Ball.containers = self.all
> >
> > This makes three aliases for .all
> >
> So every time you talk about Payer.containers is like talking about self.all...
Yes.
> > Somewhere else in the code, sprites will be added to these containers.
> >
> Maybe here?
>
> #The whole Player class
> class Player(pygame.sprite.Sprite):
>
> def __init__(self):
>
> pygame.sprite.Sprite.__init__(self, self.containers) ####HERE??
Exactly.
---
James Paige