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

Re: [pygame] circles



Hi,

Your code only makes one circle.  How can you possibly expect four circles, when you only make one?  From the spec, you need to add other instances of your circle sprite in your pygame.sprite.Group() call.  Hint: try "[circle1,circle2,circle3,circle4]"

If you tried this, then you'll see (or rather won't, but that's what's happening) that all the sprites draw over each other.  You'll need to write separate logic for each sprite's update function, or all the sprites will draw on top of each other.  I've done this by passing (varying) extra arguments to your sprites' constructors to alter their internal states.

Ian